def aic(L, k):
    """
    Akaike information criterion.

    :param L: maximized value of the negative log likelihood function
    :param k: number of free parameters
    :return: AIC
    """
    return 2*(k + L)