def _gaussian_loglik_scorer(est, X, y=None):
 precision = est.get_precision()
 (n_samples, n_features) = X.shape
 log_like = np.zeros(n_samples)
 log_like = ((-0.5) * (X * np.dot(X, precision)).sum(axis=1))
 log_like -= (0.5 * ((n_features * log((2.0 * np.pi))) - _logdet(precision)))
 out = np.mean(log_like)
 return out

def _gaussian_loglik_scorer ( est , X , y = None ) : precision = est . get_precision ( ) ( n_samples , n_features ) = X . shape log_like = np . zeros ( n_samples ) log_like = ( ( - 0.5 ) * ( X * np . dot ( X , precision ) ) . sum ( axis = 1 ) ) log_like -= ( 0.5 * ( ( n_features * log ( ( 2.0 * np . pi ) ) ) - _logdet ( precision ) ) ) out = np . mean ( log_like ) return out
compute the gaussian log likelihood of x under the model in est .