Skip to content

Commit 7bc20c0

Browse files
thomasjpfanqinhanmin2014
authored andcommitted
DOC Minor changes to DOCS to address sphinx warnings (scikit-learn#12999)
1 parent 625dafe commit 7bc20c0

File tree

12 files changed

+74
-73
lines changed

12 files changed

+74
-73
lines changed

doc/modules/clustering.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,24 +1311,24 @@ more broadly common names.
13111311
Machine Learning Research 3: 583–617.
13121312
`doi:10.1162/153244303321897735 <http://strehl.com/download/strehl-jmlr02.pdf>`_.
13131313

1314-
* [VEB2009] Vinh, Epps, and Bailey, (2009). "Information theoretic measures
1314+
* `Wikipedia entry for the (normalized) Mutual Information
1315+
<https://en.wikipedia.org/wiki/Mutual_Information>`_
1316+
1317+
* `Wikipedia entry for the Adjusted Mutual Information
1318+
<https://en.wikipedia.org/wiki/Adjusted_Mutual_Information>`_
1319+
1320+
.. [VEB2009] Vinh, Epps, and Bailey, (2009). "Information theoretic measures
13151321
for clusterings comparison". Proceedings of the 26th Annual International
13161322
Conference on Machine Learning - ICML '09.
13171323
`doi:10.1145/1553374.1553511 <https://dl.acm.org/citation.cfm?doid=1553374.1553511>`_.
13181324
ISBN 9781605585161.
13191325
1320-
* [VEB2010] Vinh, Epps, and Bailey, (2010). "Information Theoretic Measures for
1326+
.. [VEB2010] Vinh, Epps, and Bailey, (2010). "Information Theoretic Measures for
13211327
Clusterings Comparison: Variants, Properties, Normalization and
13221328
Correction for Chance". JMLR
13231329
<http://jmlr.csail.mit.edu/papers/volume11/vinh10a/vinh10a.pdf>
1324-
1325-
* `Wikipedia entry for the (normalized) Mutual Information
1326-
<https://en.wikipedia.org/wiki/Mutual_Information>`_
1327-
1328-
* `Wikipedia entry for the Adjusted Mutual Information
1329-
<https://en.wikipedia.org/wiki/Adjusted_Mutual_Information>`_
13301330
1331-
* [YAT2016] Yang, Algesheimer, and Tessone, (2016). "A comparative analysis of
1331+
.. [YAT2016] Yang, Algesheimer, and Tessone, (2016). "A comparative analysis of
13321332
community
13331333
detection algorithms on artificial networks". Scientific Reports 6: 30750.
13341334
`doi:10.1038/srep30750 <https://www.nature.com/articles/srep30750>`_.
@@ -1655,7 +1655,8 @@ Drawbacks
16551655
.. _calinski_harabasz_index:
16561656

16571657
Calinski-Harabasz Index
1658-
----------------------
1658+
-----------------------
1659+
16591660
If the ground truth labels are not known, the Calinski-Harabasz index
16601661
(:func:`sklearn.metrics.calinski_harabasz_score`) - also known as the Variance
16611662
Ratio Criterion - can be used to evaluate the model, where a higher

doc/modules/ensemble.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,10 +1053,10 @@ Vector Machine, a Decision Tree, and a K-nearest neighbor classifier::
10531053
:align: center
10541054
:scale: 75%
10551055

1056-
Using the `VotingClassifier` with `GridSearch`
1057-
----------------------------------------------
1056+
Using the `VotingClassifier` with `GridSearchCV`
1057+
------------------------------------------------
10581058

1059-
The `VotingClassifier` can also be used together with `GridSearch` in order
1059+
The `VotingClassifier` can also be used together with `GridSearchCV` in order
10601060
to tune the hyperparameters of the individual estimators::
10611061

10621062
>>> from sklearn.model_selection import GridSearchCV

doc/whats_new/v0.20.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.. currentmodule:: sklearn
44

5-
.. _changes_0_20_3:
5+
.. _changes_0_20_3:
66

77
Version 0.20.3
88
==============

doc/whats_new/v0.21.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Support for Python 3.4 and below has been officially dropped.
5252
:user:`Adrin Jalali <adrinjalali>`, and :user:`Erich Schubert <kno10>`.
5353

5454
:mod:`sklearn.datasets`
55-
......................
55+
.......................
5656

5757
- |Fix| Added support for 64-bit group IDs and pointers in SVMLight files
5858
:class:`datasets.svmlight_format` :issue:`10727` by
@@ -168,7 +168,7 @@ Support for Python 3.4 and below has been officially dropped.
168168
to add flexibility in identifying the best
169169
estimator. An example for this interface has been added.
170170
:issue:`11354` by :user:`Wenhao Zhang <wenhaoz@ucla.edu>`,
171-
`Joel Nothman`_ and `Adrin Jalali`_
171+
`Joel Nothman`_ and :user:`Adrin Jalali <adrinjalali>`.
172172

173173
- |Enhancement| Classes :class:`~model_selection.GridSearchCV`,
174174
:class:`~model_selection.RandomizedSearchCV`, and methods

examples/covariance/plot_robust_vs_empirical_covariance.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The usual covariance maximum likelihood estimate is very sensitive to the
77
presence of outliers in the data set. In such a case, it would be better to
88
use a robust estimator of covariance to guarantee that the estimation is
9-
resistant to "erroneous" observations in the data set.
9+
resistant to "erroneous" observations in the data set. [1]_, [2]_
1010
1111
Minimum Covariance Determinant Estimator
1212
----------------------------------------
@@ -23,7 +23,7 @@
2323
we end up with robust estimates of the data set location and covariance.
2424
2525
The Minimum Covariance Determinant estimator (MCD) has been introduced by
26-
P.J.Rousseuw in [1]_.
26+
P.J.Rousseuw in [3]_.
2727
2828
Evaluation
2929
----------
@@ -42,14 +42,14 @@
4242
4343
References
4444
----------
45-
.. [1] P. J. Rousseeuw. Least median of squares regression. Journal of American
46-
Statistical Ass., 79:871, 1984.
47-
.. [2] Johanna Hardin, David M Rocke. The distribution of robust distances.
45+
.. [1] Johanna Hardin, David M Rocke. The distribution of robust distances.
4846
Journal of Computational and Graphical Statistics. December 1, 2005,
4947
14(4): 928-946.
50-
.. [3] Zoubir A., Koivunen V., Chakhchoukh Y. and Muma M. (2012). Robust
48+
.. [2] Zoubir A., Koivunen V., Chakhchoukh Y. and Muma M. (2012). Robust
5149
estimation in signal processing: A tutorial-style treatment of
5250
fundamental concepts. IEEE Signal Processing Magazine 29(4), 61-80.
51+
.. [3] P. J. Rousseeuw. Least median of squares regression. Journal of American
52+
Statistical Ass., 79:871, 1984.
5353
5454
"""
5555
print(__doc__)

sklearn/covariance/robust_covariance.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -601,14 +601,14 @@ class MinCovDet(EmpiricalCovariance):
601601
References
602602
----------
603603
604-
.. [Rouseeuw1984] `P. J. Rousseeuw. Least median of squares regression.
605-
J. Am Stat Ass, 79:871, 1984.`
606-
.. [Rousseeuw] `A Fast Algorithm for the Minimum Covariance Determinant
604+
.. [Rouseeuw1984] P. J. Rousseeuw. Least median of squares regression.
605+
J. Am Stat Ass, 79:871, 1984.
606+
.. [Rousseeuw] A Fast Algorithm for the Minimum Covariance Determinant
607607
Estimator, 1999, American Statistical Association and the American
608-
Society for Quality, TECHNOMETRICS`
609-
.. [ButlerDavies] `R. W. Butler, P. L. Davies and M. Jhun,
608+
Society for Quality, TECHNOMETRICS
609+
.. [ButlerDavies] R. W. Butler, P. L. Davies and M. Jhun,
610610
Asymptotics For The Minimum Covariance Determinant Estimator,
611-
The Annals of Statistics, 1993, Vol. 21, No. 3, 1385-1400`
611+
The Annals of Statistics, 1993, Vol. 21, No. 3, 1385-1400
612612
613613
"""
614614
_nonrobust_covariance = staticmethod(empirical_covariance)
@@ -685,9 +685,9 @@ def correct_covariance(self, data):
685685
References
686686
----------
687687
688-
.. [RVD] `A Fast Algorithm for the Minimum Covariance
688+
.. [RVD] A Fast Algorithm for the Minimum Covariance
689689
Determinant Estimator, 1999, American Statistical Association
690-
and the American Society for Quality, TECHNOMETRICS`
690+
and the American Society for Quality, TECHNOMETRICS
691691
692692
Returns
693693
-------
@@ -726,9 +726,9 @@ def reweight_covariance(self, data):
726726
References
727727
----------
728728
729-
.. [RVDriessen] `A Fast Algorithm for the Minimum Covariance
729+
.. [RVDriessen] A Fast Algorithm for the Minimum Covariance
730730
Determinant Estimator, 1999, American Statistical Association
731-
and the American Society for Quality, TECHNOMETRICS`
731+
and the American Society for Quality, TECHNOMETRICS
732732
733733
Returns
734734
-------

sklearn/decomposition/fastica_.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ def my_g(x):
259259
faster for Fortran-ordered input.
260260
261261
Implemented using FastICA:
262-
`A. Hyvarinen and E. Oja, Independent Component Analysis:
262+
*A. Hyvarinen and E. Oja, Independent Component Analysis:
263263
Algorithms and Applications, Neural Networks, 13(4-5), 2000,
264-
pp. 411-430`
264+
pp. 411-430*
265265
266266
"""
267267
random_state = check_random_state(random_state)
@@ -455,9 +455,9 @@ def my_g(x):
455455
Notes
456456
-----
457457
Implementation based on
458-
`A. Hyvarinen and E. Oja, Independent Component Analysis:
458+
*A. Hyvarinen and E. Oja, Independent Component Analysis:
459459
Algorithms and Applications, Neural Networks, 13(4-5), 2000,
460-
pp. 411-430`
460+
pp. 411-430*
461461
462462
"""
463463
def __init__(self, n_components=None, algorithm='parallel', whiten=True,

sklearn/decomposition/incremental_pca.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,22 @@ class IncrementalPCA(_BasePCA):
117117
Notes
118118
-----
119119
Implements the incremental PCA model from:
120-
`D. Ross, J. Lim, R. Lin, M. Yang, Incremental Learning for Robust Visual
120+
*D. Ross, J. Lim, R. Lin, M. Yang, Incremental Learning for Robust Visual
121121
Tracking, International Journal of Computer Vision, Volume 77, Issue 1-3,
122-
pp. 125-141, May 2008.`
122+
pp. 125-141, May 2008.*
123123
See https://www.cs.toronto.edu/~dross/ivt/RossLimLinYang_ijcv.pdf
124124
125125
This model is an extension of the Sequential Karhunen-Loeve Transform from:
126-
`A. Levy and M. Lindenbaum, Sequential Karhunen-Loeve Basis Extraction and
126+
*A. Levy and M. Lindenbaum, Sequential Karhunen-Loeve Basis Extraction and
127127
its Application to Images, IEEE Transactions on Image Processing, Volume 9,
128-
Number 8, pp. 1371-1374, August 2000.`
128+
Number 8, pp. 1371-1374, August 2000.*
129129
See https://www.cs.technion.ac.il/~mic/doc/skl-ip.pdf
130130
131131
We have specifically abstained from an optimization used by authors of both
132132
papers, a QR decomposition used in specific situations to reduce the
133133
algorithmic complexity of the SVD. The source for this technique is
134-
`Matrix Computations, Third Edition, G. Holub and C. Van Loan, Chapter 5,
135-
section 5.4.4, pp 252-253.`. This technique has been omitted because it is
134+
*Matrix Computations, Third Edition, G. Holub and C. Van Loan, Chapter 5,
135+
section 5.4.4, pp 252-253.*. This technique has been omitted because it is
136136
advantageous only when decomposing a matrix with ``n_samples`` (rows)
137137
>= 5/3 * ``n_features`` (columns), and hurts the readability of the
138138
implemented algorithm. This would be a good opportunity for future
@@ -141,11 +141,11 @@ class IncrementalPCA(_BasePCA):
141141
References
142142
----------
143143
D. Ross, J. Lim, R. Lin, M. Yang. Incremental Learning for Robust Visual
144-
Tracking, International Journal of Computer Vision, Volume 77,
145-
Issue 1-3, pp. 125-141, May 2008.
144+
Tracking, International Journal of Computer Vision, Volume 77,
145+
Issue 1-3, pp. 125-141, May 2008.
146146
147147
G. Golub and C. Van Loan. Matrix Computations, Third Edition, Chapter 5,
148-
Section 5.4.4, pp. 252-253.
148+
Section 5.4.4, pp. 252-253.
149149
150150
See also
151151
--------

sklearn/decomposition/pca.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ class PCA(_BasePCA):
246246
247247
References
248248
----------
249-
For n_components == 'mle', this class uses the method of `Minka, T. P.
250-
"Automatic choice of dimensionality for PCA". In NIPS, pp. 598-604`
249+
For n_components == 'mle', this class uses the method of *Minka, T. P.
250+
"Automatic choice of dimensionality for PCA". In NIPS, pp. 598-604*
251251
252252
Implements the probabilistic PCA model from:
253253
`Tipping, M. E., and Bishop, C. M. (1999). "Probabilistic principal
@@ -259,13 +259,13 @@ class PCA(_BasePCA):
259259
For svd_solver == 'arpack', refer to `scipy.sparse.linalg.svds`.
260260
261261
For svd_solver == 'randomized', see:
262-
`Halko, N., Martinsson, P. G., and Tropp, J. A. (2011).
262+
*Halko, N., Martinsson, P. G., and Tropp, J. A. (2011).
263263
"Finding structure with randomness: Probabilistic algorithms for
264264
constructing approximate matrix decompositions".
265-
SIAM review, 53(2), 217-288.` and also
266-
`Martinsson, P. G., Rokhlin, V., and Tygert, M. (2011).
265+
SIAM review, 53(2), 217-288.* and also
266+
*Martinsson, P. G., Rokhlin, V., and Tygert, M. (2011).
267267
"A randomized algorithm for the decomposition of matrices".
268-
Applied and Computational Harmonic Analysis, 30(1), 47-68.`
268+
Applied and Computational Harmonic Analysis, 30(1), 47-68.*
269269
270270
271271
Examples

sklearn/feature_extraction/text.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,12 +1205,12 @@ class TfidfTransformer(BaseEstimator, TransformerMixin):
12051205
References
12061206
----------
12071207
1208-
.. [Yates2011] `R. Baeza-Yates and B. Ribeiro-Neto (2011). Modern
1209-
Information Retrieval. Addison Wesley, pp. 68-74.`
1208+
.. [Yates2011] R. Baeza-Yates and B. Ribeiro-Neto (2011). Modern
1209+
Information Retrieval. Addison Wesley, pp. 68-74.
12101210
1211-
.. [MRS2008] `C.D. Manning, P. Raghavan and H. Schütze (2008).
1211+
.. [MRS2008] C.D. Manning, P. Raghavan and H. Schütze (2008).
12121212
Introduction to Information Retrieval. Cambridge University
1213-
Press, pp. 118-120.`
1213+
Press, pp. 118-120.
12141214
"""
12151215

12161216
def __init__(self, norm='l2', use_idf=True, smooth_idf=True,

0 commit comments

Comments
 (0)