EmpiricalCovariance
¶
-
class
ibex.sklearn.covariance.
EmpiricalCovariance
(store_precision=True, assume_centered=False)¶ Bases:
sklearn.covariance.empirical_covariance_.EmpiricalCovariance
,ibex._base.FrameMixin
Note
The documentation following is of the class wrapped by this class. There are some changes, in particular:
- A parameter
X
denotes apandas.DataFrame
. - A parameter
y
denotes apandas.Series
.
Maximum likelihood covariance estimator
Read more in the User Guide.
- store_precision : bool
- Specifies if the estimated precision is stored.
- assume_centered : bool
- If True, data are not centered before computation. Useful when working with data whose mean is almost, but not exactly zero. If False (default), data are centered before computation.
- covariance_ : 2D ndarray, shape (n_features, n_features)
- Estimated covariance matrix
- precision_ : 2D ndarray, shape (n_features, n_features)
- Estimated pseudo-inverse matrix. (stored only if store_precision is True)
-
fit
(X, y=None)[source]¶ Note
The documentation following is of the class wrapped by this class. There are some changes, in particular:
- A parameter
X
denotes apandas.DataFrame
. - A parameter
y
denotes apandas.Series
.
- Fits the Maximum Likelihood Estimator covariance model
according to the given training data and parameters.
- X : array-like, shape = [n_samples, n_features]
- Training data, where n_samples is the number of samples and n_features is the number of features.
y : not used, present for API consistence purpose.
- self : object
- Returns self.
- A parameter
-
score
(X_test, y=None)[source]¶ Note
The documentation following is of the class wrapped by this class. There are some changes, in particular:
- A parameter
X
denotes apandas.DataFrame
. - A parameter
y
denotes apandas.Series
.
- Computes the log-likelihood of a Gaussian data set with
self.covariance_ as an estimator of its covariance matrix.
- X_test : array-like, shape = [n_samples, n_features]
- Test data of which we compute the likelihood, where n_samples is the number of samples and n_features is the number of features. X_test is assumed to be drawn from the same distribution than the data used in fit (including centering).
y : not used, present for API consistence purpose.
- res : float
- The likelihood of the data set with self.covariance_ as an estimator of its covariance matrix.
- A parameter
- A parameter