scikit-learn/scikit-learn — pull request #2505 by rphlypo (2013-10-09 15:22:45+00:00)
Title: bug fix in GraphLasso/CV and corresponding smoke test + EmpiricalCovariance updates

Bug fix in GraphLasso and GraphLassoCV
---
when scoring newly observed data X with the GraphLasso covariance estimator, the location_ parameter was reported missing. To this end, a parameter `assume_centered` has been added to the :method:`__init__` of both.

In the :method:`fit`, the parameter `assume_centered` is the used to either calculate the mean and store it in location_ or store a zero vector, solving the compatibility issue. This issue drove me to update the doc of the covariance module

smoke test
---
a smoke test has been added accordingly to test whether data scoring after fitting a GraphLasso works fine

covariance module (doc)
---
in the documentation of the covariance, the use of `assume_centered` is elaborated upon to warn the user about its implications

EmpiricalCovariance::log_likelihood
---
the :method:`log-likelihood` of :class:`EmpiricalCovariance` returns a normalized, biased, and scaled version of the log-likelihood, renamed it empirical expected log-likelihood (accounting for the normalization), rescaled it, and added its constants, so universal comparison is possible (beyond this software package)