def aic_measure(log_likelihood, params_num):
    """
    Returns the Akaike information criterion value, that is
    AIC = -2ln(L) + 2m,
    where L is the likelihood in the optimum and m is the number of parameters in the
    model.

    :param log_likelihood: optimized log-likelihood.
    :param params_num: number of model parameters.
    :return: AIC value.
    """
    return -2*(log_likelihood - params_num)