def aic(log_lik, n_samples, dof):
    """
    Calculates the Akaike Information Criterion.

    Parameters
    ----------
    log_lik: float
        The observed data log-likelihood.

    n_samples: int
        Number of samples.

    dof: int
        Number of degrees of freedom.

    Output
    ------
    bic: float
    """
    return - 2 * log_lik + 2 * dof