def log_likelihood(emp_cov, precision):
 p = precision.shape[0]
 log_likelihood_ = ((- np.sum((emp_cov * precision))) + fast_logdet(precision))
 log_likelihood_ -= (p * np.log((2 * np.pi)))
 log_likelihood_ /= 2.0
 return log_likelihood_

def log_likelihood ( emp_cov , precision ) : p = precision . shape [ 0 ] log_likelihood_ = ( ( - np . sum ( ( emp_cov * precision ) ) ) + fast_logdet ( precision ) ) log_likelihood_ -= ( p * np . log ( ( 2 * np . pi ) ) ) log_likelihood_ /= 2.0 return log_likelihood_
computes the sample mean of the log_likelihood under a covariance model computes the empirical expected log-likelihood .