Skip to content

Commit e4a7eb2

Browse files
Adjust and improve DOC add link to plot_covariance_estimation example in docstrings and userguide
1 parent 33f1413 commit e4a7eb2

File tree

3 files changed

+42
-17
lines changed

3 files changed

+42
-17
lines changed

.pre-commit-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- repo: https://github.com/astral-sh/ruff-pre-commit
9+
# Ruff version.
10+
rev: v0.5.1
11+
hooks:
12+
- id: ruff
13+
args: ["--fix", "--output-format=full"]
14+
- repo: https://github.com/psf/black
15+
rev: 24.3.0
16+
hooks:
17+
- id: black
18+
- repo: https://github.com/pre-commit/mirrors-mypy
19+
rev: v1.9.0
20+
hooks:
21+
- id: mypy
22+
files: sklearn/
23+
additional_dependencies: [pytest==6.2.4]
24+
- repo: https://github.com/MarcoGorelli/cython-lint
25+
rev: v0.15.0
26+
hooks:
27+
# TODO: add the double-quote-cython-strings hook when it's usability has improved:
28+
# possibility to pass a directory and use it as a check instead of auto-formatter.
29+
- id: cython-lint
30+
- repo: https://github.com/pre-commit/mirrors-prettier
31+
rev: v2.7.1
32+
hooks:
33+
- id: prettier
34+
files: ^doc/scss/|^doc/js/scripts/
35+
exclude: ^doc/js/scripts/vendor/
36+
types_or: ["scss", "javascript"]

doc/modules/covariance.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ a population's covariance matrix under various settings.
1818
We assume that the observations are independent and identically
1919
distributed (i.i.d.).
2020

21+
* See :ref:`sphx_glr_auto_examples_covariance_plot_covariance_estimation.py` for
22+
an example on how to fit :class:`ShrunkCovariance` , :class:`LedoitWolf` and
23+
:class:`OAS` objects to data and for visualizing their performances in terms of
24+
likelihood.
25+
26+
2127

2228
Empirical covariance
2329
====================
@@ -42,8 +48,6 @@ by the user, and ``assume_centered=True`` should be used.
4248

4349
.. rubric:: Examples
4450

45-
* See :ref:`sphx_glr_auto_examples_covariance_plot_covariance_estimation.py` for
46-
an example on how to fit an :class:`EmpiricalCovariance` object to data.
4751

4852

4953
.. _shrunk_covariance:
@@ -85,8 +89,6 @@ bias/variance trade-off, and is discussed below.
8589

8690
.. rubric:: Examples
8791

88-
* See :ref:`sphx_glr_auto_examples_covariance_plot_covariance_estimation.py` for
89-
an example on how to fit a :class:`ShrunkCovariance` object to data.
9092

9193

9294
Ledoit-Wolf shrinkage
@@ -121,10 +123,6 @@ fitting a :class:`LedoitWolf` object to the same sample.
121123

122124
.. rubric:: Examples
123125

124-
* See :ref:`sphx_glr_auto_examples_covariance_plot_covariance_estimation.py` for
125-
an example on how to fit a :class:`LedoitWolf` object to data and
126-
for visualizing the performances of the Ledoit-Wolf estimator in
127-
terms of likelihood.
128126

129127
.. rubric:: References
130128

@@ -165,10 +163,6 @@ object to the same sample.
165163
166164
.. rubric:: Examples
167165

168-
* See :ref:`sphx_glr_auto_examples_covariance_plot_covariance_estimation.py` for
169-
an example on how to fit an :class:`OAS` object to data and
170-
for visualizing the performances of the OAS estimator in
171-
terms of likelihood.
172166

173167
* See :ref:`sphx_glr_auto_examples_covariance_plot_lw_vs_oas.py` to visualize the
174168
Mean Squared Error difference between a :class:`LedoitWolf` and

sklearn/model_selection/_search.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,11 +1531,6 @@ class GridSearchCV(BaseSearchCV):
15311531
'rank_test_score', 'split0_test_score',...
15321532
'split2_test_score', ...
15331533
'std_fit_time', 'std_score_time', 'std_test_score']
1534-
1535-
* See also :ref:`sphx_glr_auto_examples_covariance_plot_covariance_estimation.py`
1536-
for an example on how to fit a :class:`GridSearchCV` object to data and
1537-
for visualizing the performances of the grid search cross-validation estimator in
1538-
terms of likelihood.
15391534
"""
15401535

15411536
_parameter_constraints: dict = {

0 commit comments

Comments
 (0)