diff --git a/maint_tools/test_docstrings.py b/maint_tools/test_docstrings.py index 9c270ccbe6783..e836da61cbf6b 100644 --- a/maint_tools/test_docstrings.py +++ b/maint_tools/test_docstrings.py @@ -62,7 +62,6 @@ "MDS", "MLPRegressor", "MeanShift", - "MinCovDet", "MiniBatchDictionaryLearning", "MiniBatchKMeans", "MiniBatchSparsePCA", diff --git a/sklearn/covariance/_robust_covariance.py b/sklearn/covariance/_robust_covariance.py index e5569ea198052..484ea3fa97ed5 100644 --- a/sklearn/covariance/_robust_covariance.py +++ b/sklearn/covariance/_robust_covariance.py @@ -648,6 +648,31 @@ class MinCovDet(EmpiricalCovariance): .. versionadded:: 0.24 + See Also + -------- + EllipticEnvelope : An object for detecting outliers in + a Gaussian distributed dataset. + EmpiricalCovariance : Maximum likelihood covariance estimator. + GraphicalLasso : Sparse inverse covariance estimation + with an l1-penalized estimator. + GraphicalLassoCV : Sparse inverse covariance with cross-validated + choice of the l1 penalty. + LedoitWolf : LedoitWolf Estimator. + OAS : Oracle Approximating Shrinkage Estimator. + ShrunkCovariance : Covariance estimator with shrinkage. + + References + ---------- + + .. [Rouseeuw1984] P. J. Rousseeuw. Least median of squares regression. + J. Am Stat Ass, 79:871, 1984. + .. [Rousseeuw] A Fast Algorithm for the Minimum Covariance Determinant + Estimator, 1999, American Statistical Association and the American + Society for Quality, TECHNOMETRICS + .. [ButlerDavies] R. W. Butler, P. L. Davies and M. Jhun, + Asymptotics For The Minimum Covariance Determinant Estimator, + The Annals of Statistics, 1993, Vol. 21, No. 3, 1385-1400 + Examples -------- >>> import numpy as np @@ -665,18 +690,6 @@ class MinCovDet(EmpiricalCovariance): [0.2535..., 0.3053...]]) >>> cov.location_ array([0.0813... , 0.0427...]) - - References - ---------- - - .. [Rouseeuw1984] P. J. Rousseeuw. Least median of squares regression. - J. Am Stat Ass, 79:871, 1984. - .. [Rousseeuw] A Fast Algorithm for the Minimum Covariance Determinant - Estimator, 1999, American Statistical Association and the American - Society for Quality, TECHNOMETRICS - .. [ButlerDavies] R. W. Butler, P. L. Davies and M. Jhun, - Asymptotics For The Minimum Covariance Determinant Estimator, - The Annals of Statistics, 1993, Vol. 21, No. 3, 1385-1400 """ _nonrobust_covariance = staticmethod(empirical_covariance) @@ -695,7 +708,7 @@ def __init__( self.random_state = random_state def fit(self, X, y=None): - """Fits a Minimum Covariance Determinant with the FastMCD algorithm. + """Fit a Minimum Covariance Determinant with the FastMCD algorithm. Parameters ---------- @@ -709,6 +722,7 @@ def fit(self, X, y=None): Returns ------- self : object + Returns the instance itself. """ X = self._validate_data(X, ensure_min_samples=2, estimator="MinCovDet") random_state = check_random_state(self.random_state)