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

Skip to content

DOC Tutorial structure and layout #18261

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
merged 15 commits into from
Aug 29, 2020
Merged
8 changes: 4 additions & 4 deletions doc/themes/scikit-learn-modern/static/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -839,10 +839,6 @@ div.highlight:hover span.copybutton:hover {
background-color: #20252B;
}

div.body img.align-center {
max-width: 800px;
}

div.body img {
max-width: 100%;
height: unset!important; /* Needed because sphinx sets the height */
Expand Down Expand Up @@ -1234,6 +1230,10 @@ table.sk-sponsor-table td {
padding: 0.30rem;
}

.caption {
text-align: center
}

/* pygments - highlightning */

.highlight .hll { background-color: #ffffcc }
Expand Down
32 changes: 0 additions & 32 deletions doc/tutorial/statistical_inference/finding_help.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc/tutorial/statistical_inference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ A tutorial on statistical-learning for scientific data processing
model_selection
unsupervised_learning
putting_together
finding_help
20 changes: 8 additions & 12 deletions doc/tutorial/statistical_inference/model_selection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,23 +180,20 @@ scoring method.
.. currentmodule:: sklearn.svm

.. topic:: **Exercise**
:class: green

On the digits dataset, plot the cross-validation score of a :class:`SVC`
estimator with an linear kernel as a function of parameter ``C`` (use a
logarithmic grid of points, from 1 to 10).
On the digits dataset, plot the cross-validation score of a :class:`SVC`
estimator with an linear kernel as a function of parameter ``C`` (use a
logarithmic grid of points, from 1 to 10).

.. literalinclude:: ../../auto_examples/exercises/plot_cv_digits.py
:lines: 13-23
.. image:: /auto_examples/exercises/images/sphx_glr_plot_cv_digits_001.png
.. literalinclude:: ../../auto_examples/exercises/plot_cv_digits.py
:lines: 13-23

.. image:: /auto_examples/exercises/images/sphx_glr_plot_cv_digits_001.png
:target: ../../auto_examples/exercises/plot_cv_digits.html
:align: center
:scale: 90

**Solution:** :ref:`sphx_glr_auto_examples_exercises_plot_cv_digits.py`


**Solution:** :ref:`sphx_glr_auto_examples_exercises_plot_cv_digits.py`

Grid-search and cross-validated estimators
============================================
Expand Down Expand Up @@ -272,7 +269,6 @@ These estimators are called similarly to their counterparts, with 'CV'
appended to their name.

.. topic:: **Exercise**
:class: green

On the diabetes dataset, find the optimal regularization parameter
alpha.
Expand Down
32 changes: 9 additions & 23 deletions doc/tutorial/statistical_inference/putting_together.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ Pipelining
We have seen that some estimators can transform data and that some estimators
can predict variables. We can also create combined estimators:

.. image:: ../../auto_examples/compose/images/sphx_glr_plot_digits_pipe_001.png
:target: ../../auto_examples/compose/plot_digits_pipe.html
:scale: 65
:align: right

.. literalinclude:: ../../auto_examples/compose/plot_digits_pipe.py
:lines: 23-63



.. image:: ../../auto_examples/compose/images/sphx_glr_plot_digits_pipe_001.png
:target: ../../auto_examples/compose/plot_digits_pipe.html
:scale: 65
:align: center

Face recognition with eigenfaces
=================================
Expand All @@ -34,26 +31,15 @@ The dataset used in this example is a preprocessed excerpt of the

.. literalinclude:: ../../auto_examples/applications/plot_face_recognition.py

.. |prediction| image:: ../../images/plot_face_recognition_1.png
:scale: 50

.. |eigenfaces| image:: ../../images/plot_face_recognition_2.png
.. figure:: ../../images/plot_face_recognition_1.png
:scale: 50

.. list-table::
:class: centered

*
**Prediction**

- |prediction|

- |eigenfaces|

*

- **Prediction**
.. figure:: ../../images/plot_face_recognition_2.png
:scale: 50

- **Eigenfaces**
**Eigenfaces**

Expected results for the top 5 most represented people in the dataset::

Expand Down
13 changes: 7 additions & 6 deletions doc/tutorial/statistical_inference/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,20 @@ needs to be preprocessed in order to be used by scikit-learn.
>>> digits.images.shape
(1797, 8, 8)
>>> import matplotlib.pyplot as plt #doctest: +SKIP
>>> plt.imshow(digits.images[-1], cmap=plt.cm.gray_r) #doctest: +SKIP
>>> plt.imshow(digits.images[-1],
... cmap=plt.cm.gray_r) #doctest: +SKIP
<matplotlib.image.AxesImage object at ...>

.. image:: /auto_examples/datasets/images/sphx_glr_plot_digits_last_image_001.png
:target: ../../auto_examples/datasets/plot_digits_last_image.html
:align: left
:scale: 60

:align: center

To use this dataset with scikit-learn, we transform each 8x8 image into a
feature vector of length 64 ::

>>> data = digits.images.reshape((digits.images.shape[0], -1))

>>> data = digits.images.reshape(
... (digits.images.shape[0], -1)
... )

Estimators objects
===================
Expand Down
Loading