def _objective(mle, precision_, alpha):
 p = precision_.shape[0]
 cost = (((-2.0) * log_likelihood(mle, precision_)) + (p * np.log((2 * np.pi))))
 cost += (alpha * (np.abs(precision_).sum() - np.abs(np.diag(precision_)).sum()))
 return cost

def _objective ( mle , precision_ , alpha ) : p = precision_ . shape [ 0 ] cost = ( ( ( - 2.0 ) * log_likelihood ( mle , precision_ ) ) + ( p * np . log ( ( 2 * np . pi ) ) ) ) cost += ( alpha * ( np . abs ( precision_ ) . sum ( ) - np . abs ( np . diag ( precision_ ) ) . sum ( ) ) ) return cost
evaluation of the graph-lasso objective function the objective function is made of a shifted scaled version of the normalized log-likelihood and a penalisation term to promote sparsity .