Oracle Approximating Shrinkage Estimator
Read more in the :ref:`User Guide <shrunk_covariance>`.
OAS is a particular form of shrinkage described in 'Shrinkage Algorithms for MMSE Covariance Estimation' Chen et al., IEEE Trans. on Sign. Proc., Volume 58, Issue 10, October 2010.
The formula used here does not correspond to the one given in the article. In the original article, formula (23) states that 2/p is multiplied by Trace(cov*cov) in both the numerator and denominator, but this operation is omitted because for a large p, the value of 2/p is so small that it doesn't affect the value of the estimator.
Parameters ---------- store_precision : bool, default=True Specify if the estimated precision is stored.
assume_centered : bool, default=False If True, data will not be centered before computation. Useful when working with data whose mean is almost, but not exactly zero. If False (default), data will be centered before computation.
Attributes ---------- covariance_ : array-like, shape (n_features, n_features) Estimated covariance matrix.
precision_ : array-like, shape (n_features, n_features) Estimated pseudo inverse matrix. (stored only if store_precision is True)
shrinkage_ : float, 0 <= shrinkage <= 1 coefficient in the convex combination used for the computation of the shrunk estimate.
Notes ----- The regularised covariance is:
(1 - shrinkage) * cov + shrinkage * mu * np.identity(n_features)
where mu = trace(cov) / n_features and shrinkage is given by the OAS formula (see References)
References ---------- 'Shrinkage Algorithms for MMSE Covariance Estimation' Chen et al., IEEE Trans. on Sign. Proc., Volume 58, Issue 10, October 2010.