8000 DOC Make release highlights the first gallery section by thomasjpfan · Pull Request #16952 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Make release highlights the first gallery section #16952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
5 changes: 5 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ def __repr__(self):

def __call__(self, directory):
src_path = os.path.normpath(os.path.join(self.src_dir, directory))

# Forces Release Highlights to the top
if os.path.basename(src_path) == "release_highlights":
return "0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol


readme = os.path.join(src_path, "README.txt")

try:
Expand Down
2 changes: 1 addition & 1 deletion doc/developers/plotting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ attributes::
estimator.__class__.__name__)
return viz.plot(ax=ax, name=name, **kwargs)

Read more in :ref:`sphx_glr_auto_examples_plot_roc_curve_visualizati 10000 on_api.py`
Read more in :ref:`sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py`
and the :ref:`User Guide <visualizations>`.

Plotting with Multiple Axes
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/compose.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ or by name::
* :ref:`sphx_glr_auto_examples_feature_selection_plot_feature_selection_pipeline.py`
* :ref:`sphx_glr_auto_examples_model_selection_grid_search_text_feature_extraction.py`
* :ref:`sphx_glr_auto_examples_compose_plot_digits_pipe.py`
* :ref:`sphx_glr_auto_examples_plot_kernel_approximation.py`
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_kernel_approximation.py`
* :ref:`sphx_glr_auto_examples_svm_plot_svm_anova.py`
* :ref:`sphx_glr_auto_examples_compose_plot_compare_reduction.py`

Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ensemble.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ amount of time (e.g., on large datasets).

* :ref:`sphx_glr_auto_examples_ensemble_plot_forest_iris.py`
* :ref:`sphx_glr_auto_examples_ensemble_plot_forest_importances_faces.py`
* :ref:`sphx_glr_auto_examples_plot_multioutput_face_completion.py`
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_multioutput_face_completion.py`

.. topic:: References

Expand Down
4 changes: 2 additions & 2 deletions doc/modules/isotonic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ correlation coefficient
for predicting to unseen data. The predictions of :class:`IsotonicRegression`
thus form a function that is piecewise linear:

.. figure:: ../auto_examples/images/sphx_glr_plot_isotonic_regression_001.png
:target: ../auto_examples/plot_isotonic_regression.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_isotonic_regression_001.png
:target: ../auto_examples/miscellaneous/plot_isotonic_regression.html
:align: center
6 changes: 3 additions & 3 deletions doc/modules/kernel_approximation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ For a given value of ``n_components`` :class:`RBFSampler` is often less accurate
as :class:`Nystroem`. :class:`RBFSampler` is cheaper to compute, though, making
use of larger feature spaces more efficient.

.. figure:: ../auto_examples/images/sphx_glr_plot_kernel_approximation_002.png
:target: ../auto_examples/plot_kernel_approximation.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_kernel_approximation_002.png
:target: ../auto_examples/miscellaneous/plot_kernel_approximation.html
:scale: 50%
:align: center

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

.. topic:: Examples:

* :ref:`sphx_glr_auto_examples_plot_kernel_approximation.py`
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_kernel_approximation.py`

.. _additive_chi_kernel_approx:

Expand Down
8 changes: 4 additions & 4 deletions doc/modules/kernel_ridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ However, prediction of 100000 target values is more than three times faster
with :class:`~sklearn.svm.SVR` since it has learned a sparse model using only
approximately 1/3 of the 100 training datapoints as support vectors.

.. figure:: ../auto_examples/images/sphx_glr_plot_kernel_ridge_regression_001.png
:target: ../auto_examples/plot_kernel_ridge_regression.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_kernel_ridge_regression_001.png
:target: ../auto_examples/miscellaneous/plot_kernel_ridge_regression.html
:align: center

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

.. figure:: ../auto_examples/images/sphx_glr_plot_kernel_ridge_regression_002.png
:target: ../auto_examples/plot_kernel_ridge_regression.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_kernel_ridge_regression_002.png
:target: ../auto_examples/miscellaneous/plot_kernel_ridge_regression.html
:align: center


Expand Down
6 changes: 3 additions & 3 deletions doc/modules/multiclass.rst
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,15 @@ To use this feature, feed the classifier an indicator matrix, in which cell
[i, j] indicates the presence of label j in sample i.


.. figure:: ../auto_examples/images/sphx_glr_plot_multilabel_001.png
:target: ../auto_examples/plot_multilabel.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_multilabel_001.png
:target: ../auto_examples/miscellaneous/plot_multilabel.html
:align: center
:scale: 75%


.. topic:: Examples:

* :ref:`sphx_glr_auto_examples_plot_multilabel.py`
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_multilabel.py`

.. _ovo_classification:

Expand Down
8 changes: 4 additions & 4 deletions doc/modules/neighbors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,12 @@ which will be used to compute the weights.
:scale: 75

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

.. figure:: ../auto_examples/images/sphx_glr_plot_multioutput_face_completion_001.png
:target: ../auto_examples/plot_multioutput_face_completion.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_multioutput_face_completion_001.png
:target: ../auto_examples/miscellaneous/plot_multioutput_face_completion.html
:scale: 75
:align: center

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

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


Expand Down
18 changes: 9 additions & 9 deletions doc/modules/outlier_detection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ Outlier Factor (LOF) does not show a decision boundary in black as it
has no predict method to be applied on new data when it is used for outlier
detection.

.. figure:: ../auto_examples/images/sphx_glr_plot_anomaly_comparison_001.png
:target: ../auto_examples/plot_anomaly_comparison.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_anomaly_comparison_001.png
:target: ../auto_examples/miscellaneous/plot_anomaly_comparison.html
:align: center
:scale: 50

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

.. topic:: Examples:

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

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

* See :ref:`sphx_glr_auto_examples_plot_anomaly_comparison.py` for a
comparison with other anomaly detection methods.
* See :ref:`sphx_glr_auto_examples_miscellaneous_plot_anomaly_comparison.py`
for a comparison with other anomaly detection methods.

.. topic:: References:

Expand Down
10 changes: 5 additions & 5 deletions doc/modules/random_projection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ bounded distortion introduced by the random projection::
>>> johnson_lindenstrauss_min_dim(n_samples=[1e4, 1e5, 1e6], eps=0.1)
array([ 7894, 9868, 11841])

.. figure:: ../auto_examples/images/sphx_glr_plot_johnson_lindenstrauss_bound_001.png
:target: ../auto_examples/plot_johnson_lindenstrauss_bound.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_johnson_lindenstrauss_bound_001.png
:target: ../auto_examples/miscellaneous/plot_johnson_lindenstrauss_bound.html
:scale: 75
:align: center

.. figure:: ../auto_examples/images/sphx_glr_plot_johnson_lindenstrauss_bound_002.png
:target: ../auto_examples/plot_johnson_lindenstrauss_bound.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_johnson_lindenstrauss_bound_002.png
:target: ../auto_examples/miscellaneous/plot_johnson_lindenstrauss_bound.html
:scale: 75
:align: center

.. topic:: Example:

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

Expand Down
8 changes: 4 additions & 4 deletions doc/modules/tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,19 +280,19 @@ X is a single real value and the outputs Y are the sine and cosine of X.
:align: center

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

.. figure:: ../auto_examples/images/sphx_glr_plot_multioutput_face_completion_001.png
:target: ../auto_examples/plot_multioutput_face_completion.html
.. figure:: ../auto_examples/miscellaneous/images/sphx_glr_plot_multioutput_face_completion_001.png
:target: ../auto_examples/miscellaneous/plot_multioutput_face_completion.html
:scale: 75
:align: center

.. topic:: Examples:

* :ref:`sphx_glr_auto_examples_tree_plot_tree_regression_multioutput.py`
* :ref:`sphx_glr_auto_examples_plot_multioutput_face_completion.py`
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_multioutput_face_completion.py`

.. topic:: References:

Expand Down
2 changes: 1 addition & 1 deletion doc/modules/unsupervised_reduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ documentation: :ref:`random_projection`.

.. topic:: **Examples**

* :ref:`sphx_glr_auto_examples_plot_johnson_lindenstrauss_bound.py`
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_johnson_lindenstrauss_bound.py`

Feature agglomeration
------------------------
Expand Down
14 changes: 7 additions & 7 deletions doc/visualizations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ ROC curve for a fitted support vector machine:

svc_disp = plot_roc_curve(svc, X_test, y_test)

.. figure:: auto_examples/images/sphx_glr_plot_roc_curve_visualization_api_001.png
:target: auto_examples/plot_roc_curve_visualization_api.html
.. figure:: auto_examples/miscellaneous/images/sphx_glr_plot_roc_curve_visualization_api_001.png
:target: auto_examples/miscellaneous/plot_roc_curve_visualization_api.html
:align: center
:scale: 75%

Expand All @@ -48,8 +48,8 @@ method of the `Display` object.
rfc_disp = plot_roc_curve(rfc, X_test, y_test, ax=ax, alpha=0.8)
svc_disp.plot(ax=ax, alpha=0.8)

.. figure:: auto_examples/images/sphx_glr_plot_roc_curve_visualization_api_002.png
:target: auto_examples/plot_roc_curve_visualization_api.html
.. figure:: auto_examples/miscellaneous/images/sphx_glr_plot_roc_curve_visualization_api_002.png
:target: auto_examples/miscellaneous/plot_roc_curve_visualization_api.html
:align: center
:scale: 75%

Expand All @@ -58,9 +58,9 @@ values of the curves.

.. topic:: Examples:

* :ref:`sphx_glr_auto_examples_plot_roc_curve_visualization_api.py`
* :ref:`sphx_glr_auto_examples_plot_partial_dependence_visualization_api.py`
* :ref:`sphx_glr_auto_examples_plot_display_object_visualization.py`
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py`
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_partial_dependence_visualization_api.py`
* :ref:`sphx_glr_auto_examples_miscellaneous_plot_display_object_visualization.py`

Available Plotting Utilities
============================
Expand Down
5 changes: 0 additions & 5 deletions examples/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,3 @@

Examples
========

Miscellaneous examples
----------------------

Miscellaneous and introductory examples for scikit-learn.
7 changes: 7 additions & 0 deletions examples/miscellaneous/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _miscellaneous_examples:

Miscellaneous
-------------

Miscellaneous and introductory examples for scikit-learn.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
dataset can be randomly projected into a lower dimensional Euclidean
space while controlling the distortion in the pairwise distances.

.. _`Johnson-Lindenstrauss lemma`: https://en.wikipedia.org/wiki/Johnson%E2%80%93Lindenstrauss_lemma
.. _`Johnson-Lindenstrauss lemma`: https://en.wikipedia.org/wiki/\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this raise a warning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea a flake8 warning because I moved it.

Johnson%E2%80%93Lindenstrauss_lemma
"""

print(__doc__)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

.. note::

See also :ref:`sphx_glr_auto_examples_plot_roc_curve_visualization_api.py`
See also :ref:`sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py`

"""
""" # noqa
print(__doc__)

import pandas as pd
Expand Down
2 changes: 1 addition & 1 deletion sklearn/inspection/_plot/partial_dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class PartialDependenceDisplay:
stored as attributes.

Read more in
:ref:`sphx_glr_auto_examples_plot_partial_dependence_visualization_api.py`
:ref:`sphx_glr_auto_examples_miscellaneous_plot_partial_dependence_visualization_api.py`
and the :ref:`User Guide <visualizations>`.

.. versionadded:: 0.22
Expand Down
0