def bayesian_information_criterion(ecov, p, m, Ntotal):

    BIC = (2 * (np.log(linalg.det(ecov))) +
            ((2 * (p ** 2) * m * np.log(Ntotal)) / (Ntotal)))

    return BIC
The Bayesian Information Criterion, also known as the Schwarz criterion
dataset/ETHPy150Open nipy/nitime/nitime/utils.py/bayesian_information_criterion