8000 DOC Sphinx Unexpected unindent warnings (#15130) · crankycoder/scikit-learn@871b251 · GitHub
[go: up one dir, main page]

Skip to content

Commit 871b251

Browse files
cmarmothomasjpfan
authored andcommitted
DOC Sphinx Unexpected unindent warnings (scikit-learn#15130)
1 parent a47e914 commit 871b251

File tree

12 files changed

+63
-47
lines changed

12 files changed

+63
-47
lines changed

doc/contents.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.. include:: tune_toc.rst
33

44
.. Places global toc into the sidebar
5+
56
:globalsidebartoc: True
67

78
=================

doc/developers/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. Places global toc into the sidebar
2+
23
:globalsidebartoc: True
34

45
.. _developers_guide:

doc/preface.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
useful for PDF output as this section is not linked from elsewhere.
33
44
.. Places global toc into the sidebar
5+
56
:globalsidebartoc: True
67

78
.. _preface_menu:

doc/tutorial/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. Places global toc into the sidebar
2+
23
:globalsidebartoc: True
34

45
.. _tutorial_menu:

doc/user_guide.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. Places global toc into the sidebar
2+
23
:globalsidebartoc: True
34

45
.. title:: User guide: contents

examples/neighbors/approximate_nearest_neighbors.py

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,28 @@
1818
compatibility reasons, one extra neighbor is computed when
1919
`mode == 'distance'`. Please note that we do the same in the proposed wrappers.
2020
21-
Sample output:
22-
23-
```
24-
Benchmarking on MNIST_2000:
25-
---------------------------
26-
AnnoyTransformer: 0.583 sec
27-
NMSlibTransformer: 0.321 sec
28-
KNeighborsTransformer: 1.225 sec
29-
TSNE with AnnoyTransformer: 4.903 sec
30-
TSNE with NMSlibTransformer: 5.009 sec
31-
TSNE with KNeighborsTransformer: 6.210 sec
32-
TSNE with internal NearestNeighbors: 6.365 sec
33-
34-
Benchmarking on MNIST_10000:
35-
----------------------------
36-
AnnoyTransformer: 4.457 sec
37-
NMSlibTransformer: 2.080 sec
38-
KNeighborsTransformer: 30.680 sec
39-
TSNE with AnnoyTransformer: 30.225 sec
40-
TSNE with NMSlibTransformer: 43.295 sec
41-
TSNE with KNeighborsTransformer: 64.845 sec
42-
TSNE with internal NearestNeighbors: 64.984 sec
43-
```
21+
Sample output::
22+
23+
Benchmarking on MNIST_2000:
24+
---------------------------
25+
AnnoyTransformer: 0.583 sec
26+
NMSlibTransformer: 0.321 sec
27+
KNeighborsTransformer: 1.225 sec
28+
TSNE with AnnoyTransformer: 4.903 sec
29+
TSNE with NMSlibTransformer: 5.009 sec
30+
TSNE with KNeighborsTransformer: 6.210 sec
31+
TSNE with internal NearestNeighbors: 6.365 sec
32+
33+
Benchmarking on MNIST_10000:
34+
----------------------------
35+
AnnoyTransformer: 4.457 sec
36+
NMSlibTransformer: 2.080 sec
37+
KNeighborsTransformer: 30.680 sec
38+
TSNE with AnnoyTransformer: 30.225 sec
39+
TSNE with NMSlibTransformer: 43.295 sec
40+
TSNE with KNeighborsTransformer: 64.845 sec
41+
TSNE with internal NearestNeighbors: 64.984 sec
42+
4443
"""
4544
# Author: Tom Dupre la Tour
4645
#

sklearn/ensemble/_stacking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ class StackingClassifier(ClassifierMixin, _BaseStacking):
342342
`'predict_proba'`, `'decision_function'` or `'predict'` in that
343343
order.
344344
* otherwise, one of `'predict_proba'`, `'decision_function'` or
345-
`'predict'`. If the method is not implemented by the estimator, it
346-
will raise an error.
345+
`'predict'`. If the method is not implemented by the estimator, it
346+
will raise an error.
347347
348348
n_jobs : int, default=None
349349
The number of jobs to run in parallel all `estimators` `fit`.

sklearn/ensemble/forest.py

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -989,10 +989,11 @@ class RandomForestClassifier(ForestClassifier):
989989
max_samples : int or float, default=None
990990
If bootstrap is True, the number of samples to draw from X
991991
to train each base estimator.
992-
- If None (default), then draw `X.shape[0]` samples.
993-
- If int, then draw `max_samples` samples.
994-
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
995-
`max_samples` should be in the interval `(0, 1)`.
992+
993+
- If None (default), then draw `X.shape[0]` samples.
994+
- If int, then draw `max_samples` samples.
995+
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
996+
`max_samples` should be in the interval `(0, 1)`.
996997
997998
.. versionadded:: 0.22
998999
@@ -1277,10 +1278,11 @@ class RandomForestRegressor(ForestRegressor):
12771278
max_samples : int or float, default=None
12781279
If bootstrap is True, the number of samples to draw from X
12791280
to train each base estimator.
1280-
- If None (default), then draw `X.shape[0]` samples.
1281-
- If int, then draw `max_samples` samples.
1282-
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
1283-
`max_samples` should be in the interval `(0, 1)`.
1281+
1282+
- If None (default), then draw `X.shape[0]` samples.
1283+
- If int, then draw `max_samples` samples.
1284+
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
1285+
`max_samples` should be in the interval `(0, 1)`.
12841286
12851287
.. versionadded:: 0.22
12861288
@@ -1576,10 +1578,11 @@ class ExtraTreesClassifier(ForestClassifier):
15761578
max_samples : int or float, default=None
15771579
If bootstrap is True, the number of samples to draw from X
15781580
to train each base estimator.
1579-
- If None (default), then draw `X.shape[0]` samples.
1580-
- If int, then draw `max_samples` samples.
1581-
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
1582-
`max_samples` should be in the interval `(0, 1)`.
1581+
1582+
- If None (default), then draw `X.shape[0]` samples.
1583+
- If int, then draw `max_samples` samples.
1584+
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
1585+
`max_samples` should be in the interval `(0, 1)`.
15831586
15841587
.. versionadded:: 0.22
15851588
@@ -1841,10 +1844,11 @@ class ExtraTreesRegressor(ForestRegressor):
18411844
max_samples : int or float, default=None
18421845
If bootstrap is True, the number of samples to draw from X
18431846
to train each base estimator.
1844-
- If None (default), then draw `X.shape[0]` samples.
1845-
- If int, then draw `max_samples` samples.
1846-
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
1847-
`max_samples` should be in the interval `(0, 1)`.
1847+
1848+
- If None (default), then draw `X.shape[0]` samples.
1849+
- If int, then draw `max_samples` samples.
1850+
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
1851+
`max_samples` should be in the interval `(0, 1)`.
18481852
18491853
.. versionadded:: 0.22
18501854
@@ -2069,10 +2073,11 @@ class RandomTreesEmbedding(BaseForest):
20692073
max_samples : int or float, default=None
20702074
If bootstrap is True, the number of samples to draw from X
20712075
to train each base estimator.
2072-
- If None (default), then draw `X.shape[0]` samples.
2073-
- If int, then draw `max_samples` samples.
2074-
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
2075-
`max_samples` should be in the interval `(0, 1)`.
2076+
2077+
- If None (default), then draw `X.shape[0]` samples.
2078+
- If int, then draw `max_samples` samples.
2079+
- If float, then draw `max_samples * X.shape[0]` samples. Thus,
2080+
`max_samples` should be in the interval `(0, 1)`.
20762081
20772082
.. versionadded:: 0.22
20782083

sklearn/ensemble/partial_dependence.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def plot_partial_dependence(gbrt, X, features, feature_names=None,
211211
----------
212212
gbrt : BaseGradientBoosting
213213
A fitted gradient boosting model.
214+
214215
X : array-like of shape (n_samples, n_features)
215216
The data on which ``gbrt`` was trained.
216217

sklearn/inspection/partial_dependence.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,11 +683,13 @@ class PartialDependenceDisplay:
683683
Feature names corrsponding to the indicies in ``features``.
684684
685685
target_idx : int
686+
686687
- In a multiclass setting, specifies the class for which the PDPs
687688
should be computed. Note that for binary classification, the
688689
positive class (index 1) is always used.
689690
- In a multioutput setting, specifies the task for which the PDPs
690691
should be computed.
692+
691693
Ignored in binary classification or classical regression settings.
692694
693695
pdp_lim : dict

sklearn/manifold/isomap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ def _fit_transform(self, X):
168168
self.embedding_ = self.kernel_pca_.fit_transform(G)
169169

170170
@property
171-
@deprecated("Attribute training_data_ was deprecated in version 0.22 and "
172-
"will be removed in 0.24.")
171+
@deprecated("Attribute `training_data_` was deprecated in version 0.22 and"
172+
" will be removed in 0.24.")
173173
def training_data_(self):
174174
check_is_fitted(self)
175175
return self.nbrs_._fit_X

sklearn/utils/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,13 @@ def safe_indexing(X, indices, axis=0):
285285
X : array-like, sparse-matrix, list, pandas.DataFrame, pandas.Series
286286
Data from which to sample rows, items or columns. `list` are only
287287
supported when `axis=0`.
288+
288289
indices : bool, int, str, slice, array-like
290+
289291
- If `axis=0`, boolean and integer array-like, integer slice,
290292
and scalar integer are supported.
291293
- If `axis=1`:
294+
292295
- to select a single column, `indices` can be of `int` type for
293296
all `X` types and `str` only for dataframe. The selected subset
294297
will be 1D, unless `X` is a sparse matrix in which case it will
@@ -298,6 +301,7 @@ def safe_indexing(X, indices, axis=0):
298301
these containers can be one of the following: `int`, 'bool' and
299302
`str`. However, `str` is only supported when `X` is a dataframe.
300303
The selected subset will be 2D.
304+
301305
axis : int, default=0
302306
The axis along which `X` will be subsampled. `axis=0` will select
303307
rows while `axis=1` will select columns.

0 commit comments

Comments
 (0)
0