8000 DOC Fix warnings about references and links (#14976) · scikit-learn/scikit-learn@6bd8df0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6bd8df0

Browse files
cmarmothomasjpfan
authored andcommitted
DOC Fix warnings about references and links (#14976)
1 parent 63c2933 commit 6bd8df0

File tree

15 files changed

+43
-29
lines changed

15 files changed

+43
-29
lines changed

doc/glossary.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,12 @@ functions or non-estimator constructors.
15481548
picklable. This means, for instance, that lambdas cannot be used
15491549
as estimator parameters.
15501550

1551+
``pos_label``
1552+
Value with which positive labels must be encoded in binary
1553+
classification problems in which the positive class is not assumed.
1554+
This value is typically required to compute asymmetric evaluation
1555+
metrics such as precision and recall.
1556+
15511557
``random_state``
15521558
Whenever randomization is part of a Scikit-learn algorithm, a
15531559
``random_state`` parameter may be provided to control the random number

doc/modules/computing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ These environment variables should be set before importing scikit-learn.
565565

566566
:SKLEARN_WORKING_MEMORY:
567567

568-
Sets the default value for the :term:`working_memory` argument of
568+
Sets the default value for the `working_memory` argument of
569569
:func:`sklearn.set_config`.
570570

571571
:SKLEARN_SEED:

doc/modules/ensemble.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ trees.
456456
Scikit-learn 0.21 introduces two new experimental implementations of
457457
gradient boosting trees, namely :class:`HistGradientBoostingClassifier`
458458
and :class:`HistGradientBoostingRegressor`, inspired by
459-
`LightGBM <https://github.com/Microsoft/LightGBM>`__.
459+
`LightGBM <https://github.com/Microsoft/LightGBM>`__ (See [LightGBM]_).
460460

461461
These histogram-based estimators can be **orders of magnitude faster**
462462
than :class:`GradientBoostingClassifier` and
@@ -825,7 +825,7 @@ Histogram-Based Gradient Boosting
825825
Scikit-learn 0.21 introduces two new experimental implementations of
826826
gradient boosting trees, namely :class:`HistGradientBoostingClassifier`
827827
and :class:`HistGradientBoostingRegressor`, inspired by
828-
`LightGBM <https://github.com/Microsoft/LightGBM>`__.
828+
`LightGBM <https://github.com/Microsoft/LightGBM>`__ (See [LightGBM]_).
829829

830830
These histogram-based estimators can be **orders of magnitude faster**
831831
than :class:`GradientBoostingClassifier` and
@@ -996,10 +996,15 @@ Finally, many parts of the implementation of
996996

997997
.. topic:: References
998998

999-
.. [XGBoost] Tianqi Chen, Carlos Guestrin, "XGBoost: A Scalable Tree
1000-
Boosting System". https://arxiv.org/abs/1603.02754
1001-
.. [LightGBM] Ke et. al. "LightGBM: A Highly Efficient Gradient
1002-
BoostingDecision Tree"
999+
.. [F1999] Friedmann, Jerome H., 2007, `"Stochastic Gradient Boosting"
1000+
<https://statweb.stanford.edu/~jhf/ftp/stobst.pdf>`_
1001+
.. [R2007] G. Ridgeway, "Generalized Boosted Models: A guide to the gbm
1002+
package", 2007
1003+
.. [XGBoost] Tianqi Chen, Carlos Guestrin, `"XGBoost: A Scalable Tree
1004+
Boosting System" <https://arxiv.org/abs/1603.02754>`_
1005+
.. [LightGBM] Ke et. al. `"LightGBM: A Highly Efficient Gradient
1006+
BoostingDecision Tree" <https://papers.nips.cc/paper/
1007+
6907-lightgbm-a-highly-efficient-gradient-boosting-decision-tree>`_
10031008
10041009
.. _voting_classifier:
10051010

doc/modules/neighbors.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,5 +807,5 @@ added space complexity in the operation.
807807
J. Goldberger, S. Roweis, G. Hinton, R. Salakhutdinov, Advances in
808808
Neural Information Processing Systems, Vol. 17, May 2005, pp. 513-520.
809809
810-
.. [2] `Wikipedia entry on Neighborhood Components Analysis
811-
<https://en.wikipedia.org/wiki/Neighbourhood_components_analysis>`_
810+
`Wikipedia entry on Neighborhood Components Analysis
811+
<https://en.wikipedia.org/wiki/Neighbourhood_components_analysis>`_

doc/modules/partial_dependence.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,5 @@ which the trees were trained.
125125
Statistical Learning <https://web.stanford.edu/~hastie/ElemStatLearn//>`_,
126126
Second Edition, Section 10.13.2, Springer, 2009.
127127
128-
.. [Mol2019] C. Molnar, `Interpretable Machine Learning
128+
C. Molnar, `Interpretable Machine Learning
129129
<https://christophm.github.io/interpretable-ml-book/>`_, Section 5.1, 2019.

examples/decomposition/plot_faces_decomposition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Faces dataset decompositions
44
============================
55
6-
This example applies to :ref:`olivetti_faces` different unsupervised
6+
This example applies to :ref:`olivetti_faces_dataset` different unsupervised
77
matrix decomposition (dimension reduction) methods from the module
88
:py:mod:`sklearn.decomposition` (see the documentation chapter
99
:ref:`decompositions`) .

examples/inspection/plot_permutation_importance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
.. topic:: References:
2222
23-
.. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32,
23+
[1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32,
2424
2001. https://doi.org/10.1023/A:1010933404324
2525
"""
2626
print(__doc__)

examples/multioutput/plot_classifier_chain_yeast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
data point has at least one label. As a baseline we first train a logistic
1111
regression classifier for each of the 14 labels. To evaluate the performance of
1212
these classifiers we predict on a held-out test set and calculate the
13-
:ref:`jaccard score <jaccard_score>` for each sample.
13+
:ref:`jaccard score <jaccard_similarity_score>` for each sample.
1414
1515
Next we create 10 classifier chains. Each classifier chain contains a
1616
logistic regression model for each of the 14 labels. The models in each

sklearn/decomposition/online_lda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ class LatentDirichletAllocation(TransformerMixin, BaseEstimator):
274274
275275
References
276276
----------
277-
[1] "Online Learning for Latent Dirichlet Allocation", Matthew D. Hoffman,
278-
David M. Blei, Francis Bach, 2010
277+
.. [1] "Online Learning for Latent Dirichlet Allocation", Matthew D.
278+
Hoffman, David M. Blei, Francis Bach, 2010
279279
280280
[2] "Stochastic Variational Inference", Matthew D. Hoffman, David M. Blei,
281281
Chong Wang, John Paisley, 2013

sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,13 +749,13 @@ class HistGradientBoostingRegressor(RegressorMixin, BaseHistGradientBoosting):
749749
n_trees_per_iteration_ : int
750750
The number of tree that are built at each iteration. For regressors,
751751
this is always 1.
752-
train_score_ : ndarray, shape (n_iter_ + 1,)
752+
train_score_ : ndarray, shape (n_iter_+1,)
753753
The scores at each iteration on the training data. The first entry
754754
is the score of the ensemble before the first iteration. Scores are
755755
computed according to the ``scoring`` parameter. If ``scoring`` is
756756
not 'loss', scores are computed on a subset of at most 10 000
757757
samples. Empty if no early stopping.
758-
validation_score_ : ndarray, shape (n_iter_ + 1,)
758+
validation_score_ : ndarray, shape (n_iter_+1,)
759759
The scores at each iteration on the held-out validation data. The
760760
first entry is the score of the ensemble before the first iteration.
761761
Scores are computed according to the ``scoring`` parameter. Empty if
@@ -930,13 +930,13 @@ class HistGradientBoostingClassifier(BaseHistGradientBoosting,
930930
The number of tree that are built at each iteration. This is equal to 1
931931
for binary classification, and to ``n_classes`` for multiclass
932932
classification.
933-
train_score_ : ndarray, shape (n_iter_ + 1,)
933+
train_score_ : ndarray, shape (n_iter_+1,)
934934
The scores at each iteration on the training data. The first entry
935935
is the score of the ensemble before the first iteration. Scores are
936936
computed according to the ``scoring`` parameter. If ``scoring`` is
937937
not 'loss', scores are computed on a subset of at most 10 000
938938
samples. Empty if no early stopping.
939-
validation_score_ : ndarray, shape (n_iter_ + 1,)
939+
validation_score_ : ndarray, shape (n_iter_+1,)
940940
The scores at each iteration on the held-out validation data. The
941941
first entry is the score of the ensemble before the first iteration.
942942
Scores are computed according to the ``scoring`` parameter. Empty if

sklearn/ensemble/partial_dependence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def plot_partial_dependence(gbrt, X, features, feature_names=None,
261261
Dict with keywords passed to the ``matplotlib.pyplot.plot`` call.
262262
For two-way partial dependence plots.
263263
264-
**fig_kw : dict
264+
``**fig_kw`` : dict
265265
Dict with keywords passed to the figure() call.
266266
Note that all keywords not recognized above will be automatically
267267
included here.

sklearn/impute/_knn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class KNNImputer(TransformerMixin, BaseEstimator):
4949
5050
- 'nan_euclidean'
5151
- callable : a user-defined function which conforms to the definition
52-
of _pairwise_callable(X, Y, metric, **kwds). The function
52+
of ``_pairwise_callable(X, Y, metric, **kwds)``. The function
5353
accepts two arrays, X and Y, and a `missing_values` keyword in
5454
`kwds` and returns a scalar distance value.
5555

sklearn/linear_model/bayes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class BayesianRidge(RegressorMixin, LinearModel):
108108
sigma_ : array-like of shape (n_features, n_features)
109109
Estimated variance-covariance matrix of the weights
110110
111-
scores_ : array-like of shape (n_iter_ + 1,)
111+
scores_ : array-like of shape (n_iter_+1,)
112112
If computed_score is True, value of the log marginal likelihood (to be
113113
maximized) at each iteration of the optimization. The array starts
114114
with the value of the log marginal likelihood obtained for the initial

sklearn/metrics/ranking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ def dcg_score(y_true, y_score, k=None,
11881188
References
11891189
----------
11901190
`Wikipedia entry for Discounted Cumulative Gain
1191-
<https://en.wikipedia.org/wiki/Discounted_cumulative_gain>`_
1191+
<https://en.wikipedia.org/wiki/Discounted_cumulative_gain>`_
11921192
11931193
Jarvelin, K., & Kekalainen, J. (2002).
11941194
Cumulated gain-based evaluation of IR techniques. ACM Transactions on
@@ -1336,7 +1336,7 @@ def ndcg_score(y_true, y_score, k=None, sample_weight=None, ignore_ties=False):
13361336
References
13371337
----------
13381338
`Wikipedia entry for Discounted Cumulative Gain
1339-
<https://en.wikipedia.org/wiki/Discounted_cumulative_gain>`_
1339+
<https://en.wikipedia.org/wiki/Discounted_cumulative_gain>`_
13401340
13411341
Jarvelin, K., & Kekalainen, J. (2002).
13421342
Cumulated gain-based evaluation of IR techniques. ACM Transactions on

sklearn/svm/classes.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -827,11 +827,14 @@ class NuSVC(BaseSVC):
827827
Scalable linear Support Vector Machine for classification using
828828
liblinear.
829829
830-
Notes
831-
-----
832-
**References:** 80D9
833-
`LIBSVM: A Library for Support Vector Machines
834-
<http://www.csie.ntu.edu.tw/~cjlin/papers/libsvm.pdf>`__
830+
References
831+
----------
832+
.. [1] `LIBSVM: A Library for Support Vector Machines
833+
<http://www.csie.ntu.edu.tw/~cjlin/papers/libsvm.pdf>`_
834+
835+
.. [2] `Platt, John (1999). "Probabilistic outputs for support vector
836+
machines and comparison to regularizedlikelihood methods."
837+
<http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.1639>`_
835838
"""
836839

837840
_impl = 'nu_svc'

0 commit comments

Comments
 (0)
0