def aic_hmm(log_likelihood, dof):
    """
    Function to compute the Aikaike's information criterion for an HMM given
    the log-likelihood of observations.

    :param log_likelihood: logarithmised likelihood of the model
        dof (int) - single numeric value representing the number of trainable
        parameters of the model
    :type log_likelihood: float
    :param dof: single numeric value representing the number of trainable
        parameters of the model
    :type dof: int
    :return: the Aikaike's information criterion
    :rtype: float
    """
    return -2 * log_likelihood + 2 * dof