def bayesian_info_criterion(log_likelihood, n_params, n_samples):
 return ((n_params * np.log(n_samples)) - (2.0 * log_likelihood))

def bayesian_info_criterion ( log_likelihood , n_params , n_samples ) : return ( ( n_params * np . log ( n_samples ) ) - ( 2.0 * log_likelihood ) )
computes the bayesian information criterion given the log of the likelihood function evaluated at the estimated parameters .