Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d9e24f4

Browse files
genvalenglemaitre
andauthored
DOC Ensures that empirical_covariance passes numpydoc validation (#21439)
Co-authored-by: Guillaume Lemaitre <[email protected]>
1 parent c020c35 commit d9e24f4

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"sklearn.cluster._optics.compute_optics_graph",
3131
"sklearn.cluster._spectral.spectral_clustering",
3232
"sklearn.compose._column_transformer.make_column_transformer",
33-
"sklearn.covariance._empirical_covariance.empirical_covariance",
3433
"sklearn.covariance._graph_lasso.graphical_lasso",
3534
"sklearn.covariance._robust_covariance.fast_mcd",
3635
"sklearn.covariance._shrunk_covariance.ledoit_wolf",

sklearn/covariance/_empirical_covariance.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,18 @@ def log_likelihood(emp_cov, precision):
4949

5050

5151
def empirical_covariance(X, *, assume_centered=False):
52-
"""Computes the Maximum likelihood covariance estimator
53-
52+
"""Compute the Maximum likelihood covariance estimator.
5453
5554
Parameters
5655
----------
5756
X : ndarray of shape (n_samples, n_features)
58-
Data from which to compute the covariance estimate
57+
Data from which to compute the covariance estimate.
5958
6059
assume_centered : bool, default=False
61-
If True, data will not be centered before computation.
60+
If `True`, data will not be centered before computation.
6261
Useful when working with data whose mean is almost, but not exactly
6362
zero.
64-
If False, data will be centered before computation.
63+
If `False`, data will be centered before computation.
6564
6665
Returns
6766
-------

0 commit comments

Comments
 (0)