8000 DOC Make release highlights the first gallery section (#16952) · scikit-learn/scikit-learn@91e9427 · GitHub
[go: up one dir, main page]

Skip to content

Commit 91e9427

Browse files
authored
DOC Make release highlights the first gallery section (#16952)
1 parent 1b119c4 commit 91e9427

28 files changed

+62
-54
lines changed

doc/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ def __repr__(self):
281281

282282
def __call__(self, directory):
283283
src_path = os.path.normpath(os.path.join(self.src_dir, directory))
284+
285+
# Forces Release Highlights to the top
286+
if os.path.basename(src_path) == "release_highlights":
287+
return "0"
288+
284289
readme = os.path.join(src_path, "README.txt")
285290

286291
try:

doc/developers/plotting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ attributes::
5050
estimator.__class__.__name__)
5151
return viz.plot(ax=ax, name=name, **kwargs)
5252

53-
Read more in :ref:`sphx_glr_auto_examples_plot_roc_curve_visualization_api.py`
53+
Read more in :ref:`sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py`
5454
and the :ref:`User Guide <visualizations>`.
5555

5656
Plotting with Multiple Axes

doc/modules/compose.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ or by name::
144144
* :ref:`sphx_glr_auto_examples_feature_selection_plot_feature_selection_pipeline.py`
145145
* :ref:`sphx_glr_auto_examples_model_selection_grid_search_text_feature_extraction.py`
146146
* :ref:`sphx_glr_auto_examples_compose_plot_digits_pipe.py`
147-
* :ref:`sphx_glr_auto_examples_plot_kernel_approximation.py`
147+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_kernel_approximation.py`
148148
* :ref:`sphx_glr_auto_examples_svm_plot_svm_anova.py`
149149
* :ref:`sphx_glr_auto_examples_compose_plot_compare_reduction.py`
150150

doc/modules/ensemble.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ amount of time (e.g., on large datasets).
246246

247247
* :ref:`sphx_glr_auto_examples_ensemble_plot_forest_iris.py`
248248
* :ref:`sphx_glr_auto_examples_ensemble_plot_forest_importances_faces.py`
249-
* :ref:`sphx_glr_auto_examples_plot_multioutput_face_completion.py`
249+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_multioutput_face_completion.py`
250250

251251
.. topic:: References
252252

doc/modules/isotonic.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ correlation coefficient
2828
for predicting to unseen data. The predictions of :class:`IsotonicRegression`
2929
thus form a function that is piecewise linear:
3030

31-
.. figure:: ../auto_examples/images/sphx_glr_plot_isotonic_regression_001.png
32-
:target: ../auto_examples/plot_isotonic_regression.html
31+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_isotonic_regression_001.png
32+
:target: ../auto_examples/miscellaneous/plot_isotonic_regression.html
3333
:align: center

doc/modules/kernel_approximation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ For a given value of ``n_components`` :class:`RBFSampler` is often less accurate
8484
as :class:`Nystroem`. :class:`RBFSampler` is cheaper to compute, though, making
8585
use of larger feature spaces more efficient.
8686

87-
.. figure:: ../auto_examples/images/sphx_glr_plot_kernel_approximation_002.png
88-
:target: ../auto_examples/plot_kernel_approximation.html
87+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_kernel_approximation_002.png
88+
:target: ../auto_examples/miscellaneous/plot_kernel_approximation.html
8989
:scale: 50%
9090
:align: center
9191

9292
Comparing an exact RBF kernel (left) with the approximation (right)
9393

9494
.. topic:: Examples:
9595

96-
* :ref:`sphx_glr_auto_examples_plot_kernel_approximation.py`
96+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_kernel_approximation.py`
9797

9898
.. _additive_chi_kernel_approx:
9999

doc/modules/kernel_ridge.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ However, prediction of 100000 target values is more than three times faster
3535
with :class:`~sklearn.svm.SVR` since it has learned a sparse model using only
3636
approximately 1/3 of the 100 training datapoints as support vectors.
3737

38-
.. figure:: ../auto_examples/images/sphx_glr_plot_kernel_ridge_regression_001.png
39-
:target: ../auto_examples/plot_kernel_ridge_regression.html
38+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_kernel_ridge_regression_001.png
39+
:target: ../auto_examples/miscellaneous/plot_kernel_ridge_regression.html
4040
:align: center
4141

4242
The next figure compares the time for fitting and prediction of
@@ -51,8 +51,8 @@ prediction time depends on the parameters :math:`\epsilon` and :math:`C` of
5151
the :class:`~sklearn.svm.SVR`; :math:`\epsilon = 0` would correspond to a
5252
dense model.
5353

54-
.. figure:: ../auto_examples/images/sphx_glr_plot_kernel_ridge_regression_002.png
55-
:target: ../auto_examples/plot_kernel_ridge_regression.html
54+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_kernel_ridge_regression_002.png
55+
:target: ../auto_examples/miscellaneous/plot_kernel_ridge_regression.html
5656
:align: center
5757

5858

doc/modules/multiclass.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,15 @@ To use this feature, feed the classifier an indicator matrix, in which cell
311311
[i, j] indicates the presence of label j in sample i.
312312

313313

314-
.. figure:: ../auto_examples/images/sphx_glr_plot_multilabel_001.png
315-
:target: ../auto_examples/plot_multilabel.html
314+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_multilabel_001.png
315+
:target: ../auto_examples/miscellaneous/plot_multilabel.html
316316
:align: center
317317
:scale: 75%
318318

319319

320320
.. topic:: Examples:
321321

322-
* :ref:`sphx_glr_auto_examples_plot_multilabel.py`
322+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_multilabel.py`
323323

324324
.. _ovo_classification:
325325

doc/modules/neighbors.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,12 @@ which will be used to compute the weights.
230230
:scale: 75
231231

232232
The use of multi-output nearest neighbors for regression is demonstrated in
233-
:ref:`sphx_glr_auto_examples_plot_multioutput_face_completion.py`. In this example, the inputs
233+
:ref:`sphx_glr_auto_examples_miscellaneous_plot_multioutput_face_completion.py`. In this example, the inputs
234234
X are the pixels of the upper half of faces and the outputs Y are the pixels of
235235
the lower half of those faces.
236236

237-
.. figure:: ../auto_examples/images/sphx_glr_plot_multioutput_face_completion_001.png
238-
:target: ../auto_examples/plot_multioutput_face_completion.html
237+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_multioutput_face_completion_001.png
238+
:target: ../auto_examples/miscellaneous/plot_multioutput_face_completion.html
239239
:scale: 75
240240
:align: center
241241

@@ -245,7 +245,7 @@ the lower half of those faces.
245245
* :ref:`sphx_glr_auto_examples_neighbors_plot_regression.py`: an example of regression
246246
using nearest neighbors.
247247

248-
* :ref:`sphx_glr_auto_examples_plot_multioutput_face_completion.py`: an example of
248+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_multioutput_face_completion.py`: an example of
249249
multi-output regression using nearest neighbors.
250250

251251

doc/modules/outlier_detection.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ Outlier Factor (LOF) does not show a decision boundary in black as it
9898
has no predict method to be applied on new data when it is used for outlier
9999
detection.
100100

101-
.. figure:: ../auto_examples/images/sphx_glr_plot_anomaly_comparison_001.png
102-
:target: ../auto_examples/plot_anomaly_comparison.html
101+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_anomaly_comparison_001.png
102+
:target: ../auto_examples/miscellaneous/plot_anomaly_comparison.html
103103
:align: center
104104
:scale: 50
105105

@@ -109,12 +109,12 @@ The :class:`svm.OneClassSVM` is known to be sensitive to outliers and thus
109109
does not perform very well for outlier detection. Finally,
110110
:class:`covariance.EllipticEnvelope` assumes the data is Gaussian and learns
111111
an ellipse. For more details on the different estimators refer to the example
112-
:ref:`sphx_glr_auto_examples_plot_anomaly_comparison.py` and the sections
113-
hereunder.
112+
:ref:`sphx_glr_auto_examples_miscellaneous_plot_anomaly_comparison.py` and the
113+
sections hereunder.
114114

115115
.. topic:: Examples:
116116

117-
* See :ref:`sphx_glr_auto_examples_plot_anomaly_comparison.py`
117+
* See :ref:`sphx_glr_auto_examples_miscellaneous_plot_anomaly_comparison.py`
118118
for a comparison of the :class:`svm.OneClassSVM`, the
119119
:class:`ensemble.IsolationForest`, the
120120
:class:`neighbors.LocalOutlierFactor` and
@@ -270,8 +270,8 @@ allows you to add more trees to an already fitted model::
270270
* See :ref:`sphx_glr_auto_examples_ensemble_plot_isolation_forest.py` for
271271
an illustration of the use of IsolationForest.
272272

273-
* See :ref:`sphx_glr_auto_examples_plot_anomaly_comparison.py` for a
274-
comparison of :class:`ensemble.IsolationForest` with
273+
* See :ref:`sphx_glr_auto_examples_miscellaneous_plot_anomaly_comparison.py`
274+
for a comparison of :class:`ensemble.IsolationForest` with
275275
:class:`neighbors.LocalOutlierFactor`,
276276
:class:`svm.OneClassSVM` (tuned to perform like an outlier detection
277277
method) and a covariance-based outlier detection with
@@ -339,8 +339,8 @@ This strategy is illustrated below.
339339
* See :ref:`sphx_glr_auto_examples_neighbors_plot_lof_outlier_detection.py`
340340
for an illustration of the use of :class:`neighbors.LocalOutlierFactor`.
341341

342-
* See :ref:`sphx_glr_auto_examples_plot_anomaly_comparison.py` for a
343-
comparison with other anomaly detection methods.
342+
* See :ref:`sphx_glr_auto_examples_miscellaneous_plot_anomaly_comparison.py`
343+
for a comparison with other anomaly detection methods.
344344

345345
.. topic:: References:
346346

doc/modules/random_projection.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,19 @@ bounded distortion introduced by the random projection::
6464
>>> johnson_lindenstrauss_min_dim(n_samples=[1e4, 1e5, 1e6], eps=0.1)
6565
array([ 7894, 9868, 11841])
6666

67-
.. figure:: ../auto_examples/images/sphx_glr_plot_johnson_lindenstrauss_bound_001.png
68-
:target: ../auto_examples/plot_johnson_lindenstrauss_bound.html
67+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_johnson_lindenstrauss_bound_001.png
68+
:target: ../auto_examples/miscellaneous/plot_johnson_lindenstrauss_bound.html
6969
:scale: 75
7070
:align: center
7171

72-
.. figure:: ../auto_examples/images/sphx_glr_plot_johnson_lindenstrauss_bound_002.png
73-
:target: ../auto_examples/plot_johnson_lindenstrauss_bound.html
72+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_johnson_lindenstrauss_bound_002.png
73+
:target: ../auto_examples/miscellaneous/plot_johnson_lindenstrauss_bound.html
7474
:scale: 75
7575
:align: center
7676

7777
.. topic:: Example:
7878

79-
* See :ref:`sphx_glr_auto_examples_plot_johnson_lindenstrauss_bound.py`
79+
* See :ref:`sphx_glr_auto_examples_miscellaneous_plot_johnson_lindenstrauss_bound.py`
8080
for a theoretical explication on the Johnson-Lindenstrauss lemma and an
8181
empirical validation using sparse random matrices.
8282

doc/modules/tree.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,19 +280,19 @@ X is a single real value and the outputs Y are the sine and cosine of X.
280280
:align: center
281281

282282
The use of multi-output trees for classification is demonstrated in
283-
:ref:`sphx_glr_auto_examples_plot_multioutput_face_completion.py`. In this example, the inputs
283+
:ref:`sphx_glr_auto_examples_miscellaneous_plot_multioutput_face_completion.py`. In this example, the inputs
284284
X are the pixels of the upper half of faces and the outputs Y are the pixels of
285285
the lower half of those faces.
286286

287-
.. figure:: ../auto_examples/images/sphx_glr_plot_multioutput_face_completion_001.png
288-
:target: ../auto_examples/plot_multioutput_face_completion.html
287+
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_multioutput_face_completion_001.png
288+
:target: ../auto_examples/miscellaneous/plot_multioutput_face_completion.html
289289
:scale: 75
290290
:align: center
291291

292292
.. topic:: Examples:
293293

294294
* :ref:`sphx_glr_auto_examples_tree_plot_tree_regression_multioutput.py`
295-
* :ref:`sphx_glr_auto_examples_plot_multioutput_face_completion.py`
295+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_multioutput_face_completion.py`
296296

297297
.. topic:: References:
298298

doc/modules/unsupervised_reduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ documentation: :ref:`random_projection`.
3737

3838
.. topic:: **Examples**
3939

40-
* :ref:`sphx_glr_auto_examples_plot_johnson_lindenstrauss_bound.py`
40+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_johnson_lindenstrauss_bound.py`
4141

4242
Feature agglomeration
4343
------------------------

doc/visualizations.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ ROC curve for a fitted support vector machine:
2424
2525
svc_disp = plot_roc_curve(svc, X_test, y_test)
2626
27-
.. figure:: auto_examples/images/sphx_glr_plot_roc_curve_visualization_api_001.png
28-
:target: auto_examples/plot_roc_curve_visualization_api.html
27+
.. figure:: auto_examples/miscellaneous/images/sphx_glr_plot_roc_curve_visualization_api_001.png
28+
:target: auto_examples/miscellaneous/plot_roc_curve_visualization_api.html
2929
:align: center
3030
:scale: 75%
3131

@@ -48,8 +48,8 @@ method of the `Display` object.
4848
rfc_disp = plot_roc_curve(rfc, X_test, y_test, ax=ax, alpha=0.8)
4949
svc_disp.plot(ax=ax, alpha=0.8)
5050
51-
.. figure:: auto_examples/images/sphx_glr_plot_roc_curve_visualization_api_002.png
52-
:target: auto_examples/plot_roc_curve_visualization_api.html
51+
.. figure:: auto_examples/miscellaneous/images/sphx_glr_plot_roc_curve_visualization_api_002.png
52+
:target: auto_examples/miscellaneous/plot_roc_curve_visualization_api.html
5353
:align: center
5454
:scale: 75%
5555

@@ -58,9 +58,9 @@ values of the curves.
5858

5959
.. topic:: Examples:
6060

61-
* :ref:`sphx_glr_auto_examples_plot_roc_curve_visualization_api.py`
62-
* :ref:`sphx_glr_auto_examples_plot_partial_dependence_visualization_api.py`
63-
* :ref:`sphx_glr_auto_examples_plot_display_object_visualization.py`
61+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py`
62+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_partial_dependence_visualization_api.py`
63+
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_display_object_visualization.py`
6464

6565
Available Plotting Utilities
6666
============================

examples/README.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,3 @@
22

33
Examples
44
========
5-
6-
Miscellaneous examples
7-
----------------------
8-
9-
Miscellaneous and introductory examples for scikit-learn.

examples/miscellaneous/README.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _miscellaneous_examples:
2+
3+
Miscellaneous
4+
-------------
5+
6+
Miscellaneous and introductory examples for scikit-learn.
7+

examples/plot_johnson_lindenstrauss_bound.py renamed to examples/miscellaneous/plot_johnson_lindenstrauss_bound.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
dataset can be randomly projected into a lower dimensional Euclidean
99
space while controlling the distortion in the pairwise distances.
1010
11-
.. _`Johnson-Lindenstrauss lemma`: https://en.wikipedia.org/wiki/Johnson%E2%80%93Lindenstrauss_lemma
11+
.. _`Johnson-Lindenstrauss lemma`: https://en.wikipedia.org/wiki/\
12+
Johnson%E2%80%93Lindenstrauss_lemma
1213
"""
1314

1415
print(__doc__)

examples/plot_partial_dependence_visualization_api.py renamed to examples/miscellaneous/plot_partial_dependence_visualization_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
1111
.. note::
1212
13-
See also :ref:`sphx_glr_auto_examples_plot_roc_curve_visualization_api.py`
13+
See also :ref:`sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py`
1414
15-
"""
15+
""" # noqa
1616
print(__doc__)
1717

1818
import pandas as pd

sklearn/inspection/_plot/partial_dependence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class PartialDependenceDisplay:
343343
stored as attributes.
344344
345345
Read more in
346-
:ref:`sphx_glr_auto_examples_plot_partial_dependence_visualization_api.py`
346+
:ref:`sphx_glr_auto_examples_miscellaneous_plot_partial_dependence_visualization_api.py`
347347
and the :ref:`User Guide <visualizations>`.
348348
349349
.. versionadded:: 0.22

0 commit comments

Comments
 (0)
0