From dea00d14c53c9c534c751532819b36b9fd700d6c Mon Sep 17 00:00:00 2001 From: puhuk Date: Wed, 22 Sep 2021 00:21:43 +0900 Subject: [PATCH 01/15] DOC: use :doi: and :arxiv: directives for references To resolve issue #21088 --- doc/about.rst | 2 +- doc/modules/clustering.rst | 10 +++++----- doc/modules/decomposition.rst | 2 +- doc/modules/ensemble.rst | 2 +- doc/modules/grid_search.rst | 2 +- doc/modules/kernel_approximation.rst | 2 +- doc/modules/linear_model.rst | 6 +++--- doc/modules/model_evaluation.rst | 2 +- doc/modules/neural_networks_supervised.rst | 2 +- doc/modules/partial_dependence.rst | 2 +- doc/modules/permutation_importance.rst | 2 +- doc/modules/preprocessing.rst | 4 ++-- doc/modules/semi_supervised.rst | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/about.rst b/doc/about.rst index f4631b29ef099..747b444a8b461 100644 --- a/doc/about.rst +++ b/doc/about.rst @@ -86,7 +86,7 @@ If you want to cite scikit-learn for its API or design, you may also want to con following paper: `API design for machine learning software: experiences from the scikit-learn - project `_, Buitinck *et al.*, 2013. + project <:arxiv:`1309.0238`>`_, Buitinck *et al.*, 2013. Bibtex entry:: diff --git a/doc/modules/clustering.rst b/doc/modules/clustering.rst index 0245c48920f11..9ce8dd6ded519 100644 --- a/doc/modules/clustering.rst +++ b/doc/modules/clustering.rst @@ -546,7 +546,7 @@ graph, and SpectralClustering is initialized with `affinity='precomputed'`:: * `"Preconditioned Spectral Clustering for Stochastic Block Partition Streaming Graph Challenge" - `_ + <:arxiv:`1708.07481`>`_ David Zhuzhunashvili, Andrew Knyazev .. _hierarchical_clustering: @@ -1705,7 +1705,7 @@ cluster analysis. * Peter J. Rousseeuw (1987). "Silhouettes: a Graphical Aid to the Interpretation and Validation of Cluster Analysis". Computational and Applied Mathematics 20: 53–65. - `doi:10.1016/0377-0427(87)90125-7 `_. + `doi:10.1016/0377-0427(87)90125-7 <:doi:`10.1016/0377-0427(87)90125-7`>`_. Advantages @@ -1805,7 +1805,7 @@ number of points in cluster :math:`q`. `"A Dendrite Method for Cluster Analysis" `_. Communications in Statistics-theory and Methods 3: 1-27. - `doi:10.1080/03610927408827101 `_. + `doi:10.1080/03610927408827101 <:doi:`10.1080/03610927408827101`>`_. .. _davies-bouldin_index: @@ -1882,12 +1882,12 @@ Then the Davies-Bouldin index is defined as: "A Cluster Separation Measure" IEEE Transactions on Pattern Analysis and Machine Intelligence. PAMI-1 (2): 224-227. - `doi:10.1109/TPAMI.1979.4766909 `_. + `doi:10.1109/TPAMI.1979.4766909 <:doi:`10.1109/TPAMI.1979.4766909`>`_. * Halkidi, Maria; Batistakis, Yannis; Vazirgiannis, Michalis (2001). "On Clustering Validation Techniques" Journal of Intelligent Information Systems, 17(2-3), 107-145. - `doi:10.1023/A:1012801612483 `_. + `doi:10.1023/A:1012801612483 <:doi:`10.1023/A:1012801612483`>`_. * `Wikipedia entry for Davies-Bouldin index `_. diff --git a/doc/modules/decomposition.rst b/doc/modules/decomposition.rst index a76810bbead6f..79a7c73207e12 100644 --- a/doc/modules/decomposition.rst +++ b/doc/modules/decomposition.rst @@ -344,7 +344,7 @@ components is less than 10 (strict) and the number of samples is more than 200 - Algorithm 4.3 in `"Finding structure with randomness: Stochastic algorithms for constructing approximate matrix decompositions" - `_ + <:arxiv:`0909.4061`>`_ Halko, et al., 2009 - `"An implementation of a randomized algorithm for principal component diff --git a/doc/modules/ensemble.rst b/doc/modules/ensemble.rst index 91fc892f79d0a..6a0d227e022f7 100644 --- a/doc/modules/ensemble.rst +++ b/doc/modules/ensemble.rst @@ -1211,7 +1211,7 @@ Finally, many parts of the implementation of .. [R2007] G. Ridgeway, "Generalized Boosted Models: A guide to the gbm package", 2007 .. [XGBoost] Tianqi Chen, Carlos Guestrin, `"XGBoost: A Scalable Tree - Boosting System" `_ + Boosting System" <:arxiv:`1603.02754`>`_ .. [LightGBM] Ke et. al. `"LightGBM: A Highly Efficient Gradient BoostingDecision Tree" `_ diff --git a/doc/modules/grid_search.rst b/doc/modules/grid_search.rst index 331607c86e657..c2e9a4a32cb1f 100644 --- a/doc/modules/grid_search.rst +++ b/doc/modules/grid_search.rst @@ -539,7 +539,7 @@ since it has reached the last iteration (3) with the highest score: proc. of Machine Learning Research, 2016. .. [2] L. Li, K. Jamieson, G. DeSalvo, A. Rostamizadeh, A. Talwalkar, `Hyperband: A Novel Bandit-Based Approach to Hyperparameter Optimization - `_, in Machine Learning Research + <:arxiv:`1603.06560`>`_, in Machine Learning Research 18, 2018. .. _grid_search_tips: diff --git a/doc/modules/kernel_approximation.rst b/doc/modules/kernel_approximation.rst index b7de01e308519..e8cb482d6f424 100644 --- a/doc/modules/kernel_approximation.rst +++ b/doc/modules/kernel_approximation.rst @@ -247,7 +247,7 @@ or store training examples. `_ Vempati, S. and Vedaldi, A. and Zisserman, A. and Jawahar, CV - 2010 .. [PP2013] `"Fast and scalable polynomial kernels via explicit feature maps" - `_ + <:doi:`10.1145/2487575.2487591`>`_ Pham, N., & Pagh, R. - 2013 .. [CCF2002] `"Finding frequent items in data streams" `_ diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index fcc8ed5437ad4..0589952874279 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -934,7 +934,7 @@ to warm-starting (see :term:`Glossary `). .. [6] Mark Schmidt, Nicolas Le Roux, and Francis Bach: `Minimizing Finite Sums with the Stochastic Average Gradient. `_ - .. [7] Aaron Defazio, Francis Bach, Simon Lacoste-Julien: `SAGA: A Fast Incremental Gradient Method With Support for Non-Strongly Convex Composite Objectives. `_ + .. [7] Aaron Defazio, Francis Bach, Simon Lacoste-Julien: `SAGA: A Fast Incremental Gradient Method With Support for Non-Strongly Convex Composite Objectives. <:arxiv:`1407.0202`>`_ .. [8] https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm @@ -1494,10 +1494,10 @@ problem. The current implementation is based on * Portnoy, S., & Koenker, R. (1997). The Gaussian hare and the Laplacian tortoise: computability of squared-error versus absolute-error estimators. - Statistical Science, 12, 279-300. https://doi.org/10.1214/ss/1030037960 + Statistical Science, 12, 279-300. :doi:`10.1214/ss/1030037960` * Koenker, R. (2005). Quantile Regression. - Cambridge University Press. https://doi.org/10.1017/CBO9780511754098 + Cambridge University Press. :doi:`10.1017/CBO9780511754098` .. _polynomial_regression: diff --git a/doc/modules/model_evaluation.rst b/doc/modules/model_evaluation.rst index 3dd7313bb9b59..36ce64d857321 100644 --- a/doc/modules/model_evaluation.rst +++ b/doc/modules/model_evaluation.rst @@ -564,7 +564,7 @@ or *informedness*. and Case Studies `_, 2015. .. [Urbanowicz2015] Urbanowicz R.J., Moore, J.H. `ExSTraCS 2.0: description and evaluation of a scalable learning - classifier system `_, Evol. Intel. (2015) 8: 89. + classifier system <:doi:`10.1007/s12065-015-0128-8`>`_, Evol. Intel. (2015) 8: 89. .. _cohen_kappa: diff --git a/doc/modules/neural_networks_supervised.rst b/doc/modules/neural_networks_supervised.rst index b9f4e17c6a575..31dbba7c116de 100644 --- a/doc/modules/neural_networks_supervised.rst +++ b/doc/modules/neural_networks_supervised.rst @@ -184,7 +184,7 @@ Algorithms MLP trains using `Stochastic Gradient Descent `_, -`Adam `_, or +`Adam <:arxiv:`1412.6980`>`_, or `L-BFGS `__. Stochastic Gradient Descent (SGD) updates parameters using the gradient of the loss function with respect to a parameter that needs adaptation, i.e. diff --git a/doc/modules/partial_dependence.rst b/doc/modules/partial_dependence.rst index 8fc97f34e7490..f4567e713dc17 100644 --- a/doc/modules/partial_dependence.rst +++ b/doc/modules/partial_dependence.rst @@ -264,6 +264,6 @@ estimators that support it, and 'brute' is used for the rest. A. Goldstein, A. Kapelner, J. Bleich, and E. Pitkin, `Peeking Inside the Black Box: Visualizing Statistical Learning With Plots of Individual - Conditional Expectation `_, + Conditional Expectation <:arxiv:`1309.6392`>`_, Journal of Computational and Graphical Statistics, 24(1): 44-65, Springer, 2015. diff --git a/doc/modules/permutation_importance.rst b/doc/modules/permutation_importance.rst index 833c9fb9a696e..da24deffb71f4 100644 --- a/doc/modules/permutation_importance.rst +++ b/doc/modules/permutation_importance.rst @@ -185,4 +185,4 @@ example: .. topic:: References: .. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32, - 2001. https://doi.org/10.1023/A:1010933404324 + 2001. :doi:`10.1023/A:1010933404324` diff --git a/doc/modules/preprocessing.rst b/doc/modules/preprocessing.rst index bd506b0151536..647b820db0a4c 100644 --- a/doc/modules/preprocessing.rst +++ b/doc/modules/preprocessing.rst @@ -979,12 +979,12 @@ Interestingly, a :class:`SplineTransformer` of ``degree=0`` is the same as * Eilers, P., & Marx, B. (1996). Flexible Smoothing with B-splines and Penalties. Statist. Sci. 11 (1996), no. 2, 89--121. - `doi:10.1214/ss/1038425655 `_ + `doi:10.1214/ss/1038425655 <:doi:`10.1214/ss/1038425655`>`_ * Perperoglou, A., Sauerbrei, W., Abrahamowicz, M. et al. A review of spline function procedures in R. BMC Med Res Methodol 19, 46 (2019). `doi:10.1186/s12874-019-0666-3 - `_ + <:doi:`10.1186/s12874-019-0666-3`>`_ .. _function_transformer: diff --git a/doc/modules/semi_supervised.rst b/doc/modules/semi_supervised.rst index 7c1ea8f296a49..7ca6481928a09 100644 --- a/doc/modules/semi_supervised.rst +++ b/doc/modules/semi_supervised.rst @@ -71,7 +71,7 @@ until all samples have labels or no new samples are selected in that iteration. supervised methods. In Proceedings of the 33rd annual meeting on Association for Computational Linguistics (ACL '95). Association for Computational Linguistics, Stroudsburg, PA, USA, 189-196. DOI: - https://doi.org/10.3115/981658.981684 + :doi:`10.3115/981658.981684` .. _label_propagation: From 5d92759ddef6a120334ce24a1de484217275b113 Mon Sep 17 00:00:00 2001 From: puhuk Date: Wed, 22 Sep 2021 01:32:50 +0900 Subject: [PATCH 02/15] Update permutation_importance.rst --- doc/modules/permutation_importance.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/permutation_importance.rst b/doc/modules/permutation_importance.rst index da24deffb71f4..833c9fb9a696e 100644 --- a/doc/modules/permutation_importance.rst +++ b/doc/modules/permutation_importance.rst @@ -185,4 +185,4 @@ example: .. topic:: References: .. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32, - 2001. :doi:`10.1023/A:1010933404324` + 2001. https://doi.org/10.1023/A:1010933404324 From 4f50c25fa0950a0898a7bc3f82fc7aa6a091bd2e Mon Sep 17 00:00:00 2001 From: puhuk Date: Wed, 22 Sep 2021 02:02:29 +0900 Subject: [PATCH 03/15] Update semi_supervised.rst --- doc/modules/semi_supervised.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/semi_supervised.rst b/doc/modules/semi_supervised.rst index 7ca6481928a09..7c1ea8f296a49 100644 --- a/doc/modules/semi_supervised.rst +++ b/doc/modules/semi_supervised.rst @@ -71,7 +71,7 @@ until all samples have labels or no new samples are selected in that iteration. supervised methods. In Proceedings of the 33rd annual meeting on Association for Computational Linguistics (ACL '95). Association for Computational Linguistics, Stroudsburg, PA, USA, 189-196. DOI: - :doi:`10.3115/981658.981684` + https://doi.org/10.3115/981658.981684 .. _label_propagation: From 056a43151ef050c65bc49fb8aad346299a8f1973 Mon Sep 17 00:00:00 2001 From: puhuk Date: Wed, 22 Sep 2021 03:02:30 +0900 Subject: [PATCH 04/15] Update linear_model.rst --- doc/modules/linear_model.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index 0589952874279..ffaaa8396cd36 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -1497,7 +1497,7 @@ problem. The current implementation is based on Statistical Science, 12, 279-300. :doi:`10.1214/ss/1030037960` * Koenker, R. (2005). Quantile Regression. - Cambridge University Press. :doi:`10.1017/CBO9780511754098` + Cambridge University Press. https://doi.org/10.1017/CBO9780511754098 .. _polynomial_regression: From 627a6b2b11353b3158c30a72c1e0f7d32507261b Mon Sep 17 00:00:00 2001 From: puhuk Date: Wed, 22 Sep 2021 10:28:02 +0900 Subject: [PATCH 05/15] Update linear_model.rst --- doc/modules/linear_model.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index ffaaa8396cd36..8db3276db61f3 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -1494,7 +1494,7 @@ problem. The current implementation is based on * Portnoy, S., & Koenker, R. (1997). The Gaussian hare and the Laplacian tortoise: computability of squared-error versus absolute-error estimators. - Statistical Science, 12, 279-300. :doi:`10.1214/ss/1030037960` + Statistical Science, 12, 279-300. https://doi.org/10.1214/ss/1030037960 * Koenker, R. (2005). Quantile Regression. Cambridge University Press. https://doi.org/10.1017/CBO9780511754098 From 15cab74ae50d5d40fabd6bb7668e881e3d0dbceb Mon Sep 17 00:00:00 2001 From: puhuk Date: Thu, 23 Sep 2021 22:54:46 +0900 Subject: [PATCH 06/15] Update kernel_approximation.rst --- doc/modules/kernel_approximation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/kernel_approximation.rst b/doc/modules/kernel_approximation.rst index e8cb482d6f424..b7de01e308519 100644 --- a/doc/modules/kernel_approximation.rst +++ b/doc/modules/kernel_approximation.rst @@ -247,7 +247,7 @@ or store training examples. `_ Vempati, S. and Vedaldi, A. and Zisserman, A. and Jawahar, CV - 2010 .. [PP2013] `"Fast and scalable polynomial kernels via explicit feature maps" - <:doi:`10.1145/2487575.2487591`>`_ + `_ Pham, N., & Pagh, R. - 2013 .. [CCF2002] `"Finding frequent items in data streams" `_ From 61a32591eb9701e56789a2c99a56ead9202b1c19 Mon Sep 17 00:00:00 2001 From: puhuk Date: Fri, 24 Sep 2021 22:21:55 +0900 Subject: [PATCH 07/15] Update kernel_approximation.rst --- doc/modules/kernel_approximation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/kernel_approximation.rst b/doc/modules/kernel_approximation.rst index b7de01e308519..f67da21ed5d1f 100644 --- a/doc/modules/kernel_approximation.rst +++ b/doc/modules/kernel_approximation.rst @@ -247,7 +247,7 @@ or store training examples. `_ Vempati, S. and Vedaldi, A. and Zisserman, A. and Jawahar, CV - 2010 .. [PP2013] `"Fast and scalable polynomial kernels via explicit feature maps" - `_ + <:doi:`10.1145/2487575.2487591>`_ Pham, N., & Pagh, R. - 2013 .. [CCF2002] `"Finding frequent items in data streams" `_ From fa7327b94ca9a3d87850ff4b8ed953dcfda9f6cd Mon Sep 17 00:00:00 2001 From: puhuk Date: Thu, 7 Oct 2021 01:37:37 +0900 Subject: [PATCH 08/15] Updates with issue #21088 --- doc/about.rst | 4 +- doc/conf.py | 1 + doc/modules/clustering.rst | 13 +++--- doc/modules/decomposition.rst | 6 +-- doc/modules/ensemble.rst | 4 +- doc/modules/grid_search.rst | 5 +-- doc/modules/kernel_approximation.rst | 4 +- doc/modules/linear_model.rst | 2 +- doc/modules/model_evaluation.rst | 4 +- doc/modules/neural_networks_supervised.rst | 2 +- doc/modules/partial_dependence.rst | 4 +- doc/modules/preprocessing.rst | 5 +-- doc/sphinxext/doi_role.py | 52 ++++++++++++++++++++++ 13 files changed, 78 insertions(+), 28 deletions(-) create mode 100644 doc/sphinxext/doi_role.py diff --git a/doc/about.rst b/doc/about.rst index 747b444a8b461..83a2f3b7eaf3b 100644 --- a/doc/about.rst +++ b/doc/about.rst @@ -85,8 +85,8 @@ citations to the following paper: If you want to cite scikit-learn for its API or design, you may also want to consider the following paper: - `API design for machine learning software: experiences from the scikit-learn - project <:arxiv:`1309.0238`>`_, Buitinck *et al.*, 2013. + API design for machine learning software: experiences from the scikit-learn + project, Buitinck *et al.*, 2013. :arxiv:`1309.0238` Bibtex entry:: diff --git a/doc/conf.py b/doc/conf.py index 659a5d70fa32b..97741dfd8388a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -48,6 +48,7 @@ "add_toctree_functions", "sphinx-prompt", "sphinxext.opengraph", + "doi_role", ] # Support for `plot::` directives in sphinx 3.2 requires matplotlib 3.1.0 or newer diff --git a/doc/modules/clustering.rst b/doc/modules/clustering.rst index 9ce8dd6ded519..112333dd3b653 100644 --- a/doc/modules/clustering.rst +++ b/doc/modules/clustering.rst @@ -544,10 +544,9 @@ graph, and SpectralClustering is initialized with `affinity='precomputed'`:: `_ Andrew Y. Ng, Michael I. Jordan, Yair Weiss, 2001 - * `"Preconditioned Spectral Clustering for Stochastic + * "Preconditioned Spectral Clustering for Stochastic Block Partition Streaming Graph Challenge" - <:arxiv:`1708.07481`>`_ - David Zhuzhunashvili, Andrew Knyazev + David Zhuzhunashvili, Andrew Knyazev :arxiv:`1708.07481` .. _hierarchical_clustering: @@ -1705,7 +1704,7 @@ cluster analysis. * Peter J. Rousseeuw (1987). "Silhouettes: a Graphical Aid to the Interpretation and Validation of Cluster Analysis". Computational and Applied Mathematics 20: 53–65. - `doi:10.1016/0377-0427(87)90125-7 <:doi:`10.1016/0377-0427(87)90125-7`>`_. + :doi:`10.1016/0377-0427(87)90125-7` Advantages @@ -1805,7 +1804,7 @@ number of points in cluster :math:`q`. `"A Dendrite Method for Cluster Analysis" `_. Communications in Statistics-theory and Methods 3: 1-27. - `doi:10.1080/03610927408827101 <:doi:`10.1080/03610927408827101`>`_. + :doi:`10.1080/03610927408827101` .. _davies-bouldin_index: @@ -1882,12 +1881,12 @@ Then the Davies-Bouldin index is defined as: "A Cluster Separation Measure" IEEE Transactions on Pattern Analysis and Machine Intelligence. PAMI-1 (2): 224-227. - `doi:10.1109/TPAMI.1979.4766909 <:doi:`10.1109/TPAMI.1979.4766909`>`_. + :doi:`10.1109/TPAMI.1979.4766909` * Halkidi, Maria; Batistakis, Yannis; Vazirgiannis, Michalis (2001). "On Clustering Validation Techniques" Journal of Intelligent Information Systems, 17(2-3), 107-145. - `doi:10.1023/A:1012801612483 <:doi:`10.1023/A:1012801612483`>`_. + :doi:`10.1023/A:1012801612483` * `Wikipedia entry for Davies-Bouldin index `_. diff --git a/doc/modules/decomposition.rst b/doc/modules/decomposition.rst index 79a7c73207e12..0b36e991fbda8 100644 --- a/doc/modules/decomposition.rst +++ b/doc/modules/decomposition.rst @@ -341,13 +341,13 @@ components is less than 10 (strict) and the number of samples is more than 200 * *randomized* solver: - - Algorithm 4.3 in + * Algorithm 4.3 in `"Finding structure with randomness: Stochastic algorithms for constructing approximate matrix decompositions" - <:arxiv:`0909.4061`>`_ + `_ Halko, et al., 2009 - - `"An implementation of a randomized algorithm for principal component + * `"An implementation of a randomized algorithm for principal component analysis" `_ A. Szlam et al. 2014 diff --git a/doc/modules/ensemble.rst b/doc/modules/ensemble.rst index 6a0d227e022f7..c35b366ead059 100644 --- a/doc/modules/ensemble.rst +++ b/doc/modules/ensemble.rst @@ -1210,8 +1210,8 @@ Finally, many parts of the implementation of `_ .. [R2007] G. Ridgeway, "Generalized Boosted Models: A guide to the gbm package", 2007 - .. [XGBoost] Tianqi Chen, Carlos Guestrin, `"XGBoost: A Scalable Tree - Boosting System" <:arxiv:`1603.02754`>`_ + .. [XGBoost] Tianqi Chen, Carlos Guestrin, "XGBoost: A Scalable Tree + Boosting System" :arxiv:`1603.02754` .. [LightGBM] Ke et. al. `"LightGBM: A Highly Efficient Gradient BoostingDecision Tree" `_ diff --git a/doc/modules/grid_search.rst b/doc/modules/grid_search.rst index c2e9a4a32cb1f..671cc2e1e8fb2 100644 --- a/doc/modules/grid_search.rst +++ b/doc/modules/grid_search.rst @@ -538,9 +538,8 @@ since it has reached the last iteration (3) with the highest score: Optimization `_, in proc. of Machine Learning Research, 2016. .. [2] L. Li, K. Jamieson, G. DeSalvo, A. Rostamizadeh, A. Talwalkar, - `Hyperband: A Novel Bandit-Based Approach to Hyperparameter Optimization - <:arxiv:`1603.06560`>`_, in Machine Learning Research - 18, 2018. + Hyperband: A Novel Bandit-Based Approach to Hyperparameter Optimization + , in Machine Learning Research 18, 2018. :arxiv:`1603.06560` .. _grid_search_tips: diff --git a/doc/modules/kernel_approximation.rst b/doc/modules/kernel_approximation.rst index f67da21ed5d1f..c2cb3abe9e67d 100644 --- a/doc/modules/kernel_approximation.rst +++ b/doc/modules/kernel_approximation.rst @@ -246,8 +246,8 @@ or store training examples. .. [VVZ2010] `"Generalized RBF feature maps for Efficient Detection" `_ Vempati, S. and Vedaldi, A. and Zisserman, A. and Jawahar, CV - 2010 - .. [PP2013] `"Fast and scalable polynomial kernels via explicit feature maps" - <:doi:`10.1145/2487575.2487591>`_ + .. [PP2013] "Fast and scalable polynomial kernels via explicit feature maps" + :doi:`10.1145/2487575.2487591` Pham, N., & Pagh, R. - 2013 .. [CCF2002] `"Finding frequent items in data streams" `_ diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index 8db3276db61f3..9d25fe844891c 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -934,7 +934,7 @@ to warm-starting (see :term:`Glossary `). .. [6] Mark Schmidt, Nicolas Le Roux, and Francis Bach: `Minimizing Finite Sums with the Stochastic Average Gradient. `_ - .. [7] Aaron Defazio, Francis Bach, Simon Lacoste-Julien: `SAGA: A Fast Incremental Gradient Method With Support for Non-Strongly Convex Composite Objectives. <:arxiv:`1407.0202`>`_ + .. [7] Aaron Defazio, Francis Bach, Simon Lacoste-Julien: SAGA: A Fast Incremental Gradient Method With Support for Non-Strongly Convex Composite Objectives. :arxiv:`1407.0202` .. [8] https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm diff --git a/doc/modules/model_evaluation.rst b/doc/modules/model_evaluation.rst index 36ce64d857321..a91e16ffcc763 100644 --- a/doc/modules/model_evaluation.rst +++ b/doc/modules/model_evaluation.rst @@ -563,8 +563,8 @@ or *informedness*. Machine Learning for Predictive Data Analytics: Algorithms, Worked Examples, and Case Studies `_, 2015. - .. [Urbanowicz2015] Urbanowicz R.J., Moore, J.H. `ExSTraCS 2.0: description and evaluation of a scalable learning - classifier system <:doi:`10.1007/s12065-015-0128-8`>`_, Evol. Intel. (2015) 8: 89. + .. [Urbanowicz2015] Urbanowicz R.J., Moore, J.H. ExSTraCS 2.0: description and evaluation of a scalable learning + classifier system :doi:`10.1007/s12065-015-0128-8`, Evol. Intel. (2015) 8: 89. .. _cohen_kappa: diff --git a/doc/modules/neural_networks_supervised.rst b/doc/modules/neural_networks_supervised.rst index 31dbba7c116de..d9a5928379bf9 100644 --- a/doc/modules/neural_networks_supervised.rst +++ b/doc/modules/neural_networks_supervised.rst @@ -184,7 +184,7 @@ Algorithms MLP trains using `Stochastic Gradient Descent `_, -`Adam <:arxiv:`1412.6980`>`_, or +Adam :arxiv:`1412.6980`, or `L-BFGS `__. Stochastic Gradient Descent (SGD) updates parameters using the gradient of the loss function with respect to a parameter that needs adaptation, i.e. diff --git a/doc/modules/partial_dependence.rst b/doc/modules/partial_dependence.rst index f4567e713dc17..efa4091193cc2 100644 --- a/doc/modules/partial_dependence.rst +++ b/doc/modules/partial_dependence.rst @@ -262,8 +262,8 @@ estimators that support it, and 'brute' is used for the rest. C. Molnar, `Interpretable Machine Learning `_, Section 5.1, 2019. - A. Goldstein, A. Kapelner, J. Bleich, and E. Pitkin, `Peeking Inside the + A. Goldstein, A. Kapelner, J. Bleich, and E. Pitkin, Peeking Inside the Black Box: Visualizing Statistical Learning With Plots of Individual - Conditional Expectation <:arxiv:`1309.6392`>`_, + Conditional Expectation :arxiv:`1309.6392`, Journal of Computational and Graphical Statistics, 24(1): 44-65, Springer, 2015. diff --git a/doc/modules/preprocessing.rst b/doc/modules/preprocessing.rst index 647b820db0a4c..f7d5a85cab3f4 100644 --- a/doc/modules/preprocessing.rst +++ b/doc/modules/preprocessing.rst @@ -979,12 +979,11 @@ Interestingly, a :class:`SplineTransformer` of ``degree=0`` is the same as * Eilers, P., & Marx, B. (1996). Flexible Smoothing with B-splines and Penalties. Statist. Sci. 11 (1996), no. 2, 89--121. - `doi:10.1214/ss/1038425655 <:doi:`10.1214/ss/1038425655`>`_ + :doi:`10.1214/ss/1038425655` * Perperoglou, A., Sauerbrei, W., Abrahamowicz, M. et al. A review of spline function procedures in R. BMC Med Res Methodol 19, 46 (2019). - `doi:10.1186/s12874-019-0666-3 - <:doi:`10.1186/s12874-019-0666-3`>`_ + :doi:`10.1186/s12874-019-0666-3` .. _function_transformer: diff --git a/doc/sphinxext/doi_role.py b/doc/sphinxext/doi_role.py new file mode 100644 index 0000000000000..c0ab7c33b6948 --- /dev/null +++ b/doc/sphinxext/doi_role.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +""" + doilinks + ~~~~~~~~ + Extension to add links to DOIs. With this extension you can use e.g. + :doi:`10.1016/S0022-2836(05)80360-2` in your documents. This will + create a link to a DOI resolver + (``https://doi.org/10.1016/S0022-2836(05)80360-2``). + The link caption will be the raw DOI. + You can also give an explicit caption, e.g. + :doi:`Basic local alignment search tool <10.1016/S0022-2836(05)80360-2>`. + + :copyright: Copyright 2015 Jon Lund Steffensen. Based on extlinks by + the Sphinx team. + :license: BSD. +""" + +from docutils import nodes, utils + +from sphinx.util.nodes import split_explicit_title + + +def doi_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): + text = utils.unescape(text) + has_explicit_title, title, part = split_explicit_title(text) + full_url = 'https://doi.org/' + part + if not has_explicit_title: + title = 'DOI:' + part + pnode = nodes.reference(title, title, internal=False, refuri=full_url) + return [pnode], [] + + +def arxiv_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): + text = utils.unescape(text) + has_explicit_title, title, part = split_explicit_title(text) + full_url = 'https://arxiv.org/abs/' + part + if not has_explicit_title: + title = 'arXiv:' + part + pnode = nodes.reference(title, title, internal=False, refuri=full_url) + return [pnode], [] + + +def setup_link_role(app): + app.add_role('doi', doi_role, override=True) + app.add_role('DOI', doi_role, override=True) + app.add_role('arXiv', arxiv_role, override=True) + app.add_role('arxiv', arxiv_role, override=True) + + +def setup(app): + app.connect('builder-inited', setup_link_role) + return {'version': '0.1', 'parallel_read_safe': True} \ No newline at end of file From 14794f2c5c52a8bb9ba895530e5cfda47df21a8c Mon Sep 17 00:00:00 2001 From: puhuk Date: Thu, 7 Oct 2021 08:00:52 +0900 Subject: [PATCH 09/15] Resolve issue #21088 Updated based on PR review --- doc/about.rst | 4 ++-- doc/modules/clustering.rst | 13 +++++++------ doc/modules/decomposition.rst | 4 ++-- doc/modules/ensemble.rst | 4 ++-- doc/modules/grid_search.rst | 4 ++-- doc/modules/kernel_approximation.rst | 4 ++-- doc/modules/linear_model.rst | 2 +- doc/modules/model_evaluation.rst | 4 ++-- doc/modules/neural_networks_supervised.rst | 2 +- doc/modules/partial_dependence.rst | 4 ++-- doc/modules/preprocessing.rst | 4 ++-- doc/sphinxext/doi_role.py | 20 ++++++++++---------- 12 files changed, 35 insertions(+), 34 deletions(-) diff --git a/doc/about.rst b/doc/about.rst index 83a2f3b7eaf3b..5861cc566d91d 100644 --- a/doc/about.rst +++ b/doc/about.rst @@ -85,8 +85,8 @@ citations to the following paper: If you want to cite scikit-learn for its API or design, you may also want to consider the following paper: - API design for machine learning software: experiences from the scikit-learn - project, Buitinck *et al.*, 2013. :arxiv:`1309.0238` + :arxiv:`API design for machine learning software: experiences from the scikit-learn + project <1309.0238>`, Buitinck *et al.*, 2013. Bibtex entry:: diff --git a/doc/modules/clustering.rst b/doc/modules/clustering.rst index 112333dd3b653..ac023d993ae74 100644 --- a/doc/modules/clustering.rst +++ b/doc/modules/clustering.rst @@ -544,9 +544,10 @@ graph, and SpectralClustering is initialized with `affinity='precomputed'`:: `_ Andrew Y. Ng, Michael I. Jordan, Yair Weiss, 2001 - * "Preconditioned Spectral Clustering for Stochastic + * :arxiv:`"Preconditioned Spectral Clustering for Stochastic Block Partition Streaming Graph Challenge" - David Zhuzhunashvili, Andrew Knyazev :arxiv:`1708.07481` + <1309.0238>` + David Zhuzhunashvili, Andrew Knyazev .. _hierarchical_clustering: @@ -1704,7 +1705,7 @@ cluster analysis. * Peter J. Rousseeuw (1987). "Silhouettes: a Graphical Aid to the Interpretation and Validation of Cluster Analysis". Computational and Applied Mathematics 20: 53–65. - :doi:`10.1016/0377-0427(87)90125-7` + :doi:`doi:10.1016/0377-0427(87)90125-7 <10.1016/0377-0427(87)90125-7>` Advantages @@ -1804,7 +1805,7 @@ number of points in cluster :math:`q`. `"A Dendrite Method for Cluster Analysis" `_. Communications in Statistics-theory and Methods 3: 1-27. - :doi:`10.1080/03610927408827101` + :doi:`doi:10.1080/03610927408827101 <10.1080/03610927408827101>`. .. _davies-bouldin_index: @@ -1881,12 +1882,12 @@ Then the Davies-Bouldin index is defined as: "A Cluster Separation Measure" IEEE Transactions on Pattern Analysis and Machine Intelligence. PAMI-1 (2): 224-227. - :doi:`10.1109/TPAMI.1979.4766909` + :doi:`doi:10.1109/TPAMI.1979.4766909 <10.1109/TPAMI.1979.4766909>` * Halkidi, Maria; Batistakis, Yannis; Vazirgiannis, Michalis (2001). "On Clustering Validation Techniques" Journal of Intelligent Information Systems, 17(2-3), 107-145. - :doi:`10.1023/A:1012801612483` + :doi:`doi:10.1023/A:1012801612483 <10.1023/A:1012801612483>` * `Wikipedia entry for Davies-Bouldin index `_. diff --git a/doc/modules/decomposition.rst b/doc/modules/decomposition.rst index 0b36e991fbda8..8713ed5d86db4 100644 --- a/doc/modules/decomposition.rst +++ b/doc/modules/decomposition.rst @@ -342,9 +342,9 @@ components is less than 10 (strict) and the number of samples is more than 200 * *randomized* solver: * Algorithm 4.3 in - `"Finding structure with randomness: Stochastic algorithms for + :arxiv:`"Finding structure with randomness: Stochastic algorithms for constructing approximate matrix decompositions" - `_ + <0909.4061>` Halko, et al., 2009 * `"An implementation of a randomized algorithm for principal component diff --git a/doc/modules/ensemble.rst b/doc/modules/ensemble.rst index c35b366ead059..98ad4cc68b75a 100644 --- a/doc/modules/ensemble.rst +++ b/doc/modules/ensemble.rst @@ -1210,8 +1210,8 @@ Finally, many parts of the implementation of `_ .. [R2007] G. Ridgeway, "Generalized Boosted Models: A guide to the gbm package", 2007 - .. [XGBoost] Tianqi Chen, Carlos Guestrin, "XGBoost: A Scalable Tree - Boosting System" :arxiv:`1603.02754` + .. [XGBoost] Tianqi Chen, Carlos Guestrin, :arxiv:`"XGBoost: A Scalable Tree + Boosting System" <1603.02754>` .. [LightGBM] Ke et. al. `"LightGBM: A Highly Efficient Gradient BoostingDecision Tree" `_ diff --git a/doc/modules/grid_search.rst b/doc/modules/grid_search.rst index 671cc2e1e8fb2..19910d5a16da3 100644 --- a/doc/modules/grid_search.rst +++ b/doc/modules/grid_search.rst @@ -538,8 +538,8 @@ since it has reached the last iteration (3) with the highest score: Optimization `_, in proc. of Machine Learning Research, 2016. .. [2] L. Li, K. Jamieson, G. DeSalvo, A. Rostamizadeh, A. Talwalkar, - Hyperband: A Novel Bandit-Based Approach to Hyperparameter Optimization - , in Machine Learning Research 18, 2018. :arxiv:`1603.06560` + :arxiv:`Hyperband: A Novel Bandit-Based Approach to Hyperparameter Optimization + <1603.06560>`, in Machine Learning Research 18, 2018. .. _grid_search_tips: diff --git a/doc/modules/kernel_approximation.rst b/doc/modules/kernel_approximation.rst index c2cb3abe9e67d..b82da8e43582a 100644 --- a/doc/modules/kernel_approximation.rst +++ b/doc/modules/kernel_approximation.rst @@ -246,8 +246,8 @@ or store training examples. .. [VVZ2010] `"Generalized RBF feature maps for Efficient Detection" `_ Vempati, S. and Vedaldi, A. and Zisserman, A. and Jawahar, CV - 2010 - .. [PP2013] "Fast and scalable polynomial kernels via explicit feature maps" - :doi:`10.1145/2487575.2487591` + .. [PP2013] :doi:`"Fast and scalable polynomial kernels via explicit feature maps" + <10.1145/2487575.2487591>` Pham, N., & Pagh, R. - 2013 .. [CCF2002] `"Finding frequent items in data streams" `_ diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index 9d25fe844891c..817347791c849 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -934,7 +934,7 @@ to warm-starting (see :term:`Glossary `). .. [6] Mark Schmidt, Nicolas Le Roux, and Francis Bach: `Minimizing Finite Sums with the Stochastic Average Gradient. `_ - .. [7] Aaron Defazio, Francis Bach, Simon Lacoste-Julien: SAGA: A Fast Incremental Gradient Method With Support for Non-Strongly Convex Composite Objectives. :arxiv:`1407.0202` + .. [7] Aaron Defazio, Francis Bach, Simon Lacoste-Julien: :arxiv:`SAGA: A Fast Incremental Gradient Method With Support for Non-Strongly Convex Composite Objectives. <1407.0202>` .. [8] https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm diff --git a/doc/modules/model_evaluation.rst b/doc/modules/model_evaluation.rst index a91e16ffcc763..073df7b445bdc 100644 --- a/doc/modules/model_evaluation.rst +++ b/doc/modules/model_evaluation.rst @@ -563,8 +563,8 @@ or *informedness*. Machine Learning for Predictive Data Analytics: Algorithms, Worked Examples, and Case Studies `_, 2015. - .. [Urbanowicz2015] Urbanowicz R.J., Moore, J.H. ExSTraCS 2.0: description and evaluation of a scalable learning - classifier system :doi:`10.1007/s12065-015-0128-8`, Evol. Intel. (2015) 8: 89. + .. [Urbanowicz2015] Urbanowicz R.J., Moore, J.H. :doi:`ExSTraCS 2.0: description and evaluation of a scalable learning + classifier system <10.1007/s12065-015-0128-8>`, Evol. Intel. (2015) 8: 89. .. _cohen_kappa: diff --git a/doc/modules/neural_networks_supervised.rst b/doc/modules/neural_networks_supervised.rst index d9a5928379bf9..b8bcf4c70a1dc 100644 --- a/doc/modules/neural_networks_supervised.rst +++ b/doc/modules/neural_networks_supervised.rst @@ -184,7 +184,7 @@ Algorithms MLP trains using `Stochastic Gradient Descent `_, -Adam :arxiv:`1412.6980`, or +:arxiv:`Adam <1412.6980>`, or `L-BFGS `__. Stochastic Gradient Descent (SGD) updates parameters using the gradient of the loss function with respect to a parameter that needs adaptation, i.e. diff --git a/doc/modules/partial_dependence.rst b/doc/modules/partial_dependence.rst index efa4091193cc2..ba99be02c8e4a 100644 --- a/doc/modules/partial_dependence.rst +++ b/doc/modules/partial_dependence.rst @@ -262,8 +262,8 @@ estimators that support it, and 'brute' is used for the rest. C. Molnar, `Interpretable Machine Learning `_, Section 5.1, 2019. - A. Goldstein, A. Kapelner, J. Bleich, and E. Pitkin, Peeking Inside the + A. Goldstein, A. Kapelner, J. Bleich, and E. Pitkin, :arxiv:`Peeking Inside the Black Box: Visualizing Statistical Learning With Plots of Individual - Conditional Expectation :arxiv:`1309.6392`, + Conditional Expectation <1309.6392>`, Journal of Computational and Graphical Statistics, 24(1): 44-65, Springer, 2015. diff --git a/doc/modules/preprocessing.rst b/doc/modules/preprocessing.rst index f7d5a85cab3f4..6f29a7eef0d98 100644 --- a/doc/modules/preprocessing.rst +++ b/doc/modules/preprocessing.rst @@ -979,11 +979,11 @@ Interestingly, a :class:`SplineTransformer` of ``degree=0`` is the same as * Eilers, P., & Marx, B. (1996). Flexible Smoothing with B-splines and Penalties. Statist. Sci. 11 (1996), no. 2, 89--121. - :doi:`10.1214/ss/1038425655` + :doi:`doi:10.1214/ss/1038425655 <10.1214/ss/1038425655>` * Perperoglou, A., Sauerbrei, W., Abrahamowicz, M. et al. A review of spline function procedures in R. BMC Med Res Methodol 19, 46 (2019). - :doi:`10.1186/s12874-019-0666-3` + :doi:`doi:10.1186/s12874-019-0666-3 <10.1186/s12874-019-0666-3>` .. _function_transformer: diff --git a/doc/sphinxext/doi_role.py b/doc/sphinxext/doi_role.py index c0ab7c33b6948..10f6fc7a0df1c 100644 --- a/doc/sphinxext/doi_role.py +++ b/doc/sphinxext/doi_role.py @@ -23,9 +23,9 @@ def doi_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): text = utils.unescape(text) has_explicit_title, title, part = split_explicit_title(text) - full_url = 'https://doi.org/' + part + full_url = "https://doi.org/" + part if not has_explicit_title: - title = 'DOI:' + part + title = "DOI:" + part pnode = nodes.reference(title, title, internal=False, refuri=full_url) return [pnode], [] @@ -33,20 +33,20 @@ def doi_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): def arxiv_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): text = utils.unescape(text) has_explicit_title, title, part = split_explicit_title(text) - full_url = 'https://arxiv.org/abs/' + part + full_url = "https://arxiv.org/abs/" + part if not has_explicit_title: - title = 'arXiv:' + part + title = "arXiv:" + part pnode = nodes.reference(title, title, internal=False, refuri=full_url) return [pnode], [] def setup_link_role(app): - app.add_role('doi', doi_role, override=True) - app.add_role('DOI', doi_role, override=True) - app.add_role('arXiv', arxiv_role, override=True) - app.add_role('arxiv', arxiv_role, override=True) + app.add_role("doi", doi_role, override=True) + app.add_role("DOI", doi_role, override=True) + app.add_role("arXiv", arxiv_role, override=True) + app.add_role("arxiv", arxiv_role, override=True) def setup(app): - app.connect('builder-inited', setup_link_role) - return {'version': '0.1', 'parallel_read_safe': True} \ No newline at end of file + app.connect("builder-inited", setup_link_role) + return {"version": "0.1", "parallel_read_safe": True} From 5e768d52b0c2a50a61df9425ac9e5653a27543c8 Mon Sep 17 00:00:00 2001 From: puhuk Date: Fri, 8 Oct 2021 02:31:58 +0900 Subject: [PATCH 10/15] Update for PR #21099 --- doc/modules/clustering.rst | 16 ++++++---------- doc/modules/decomposition.rst | 4 ++-- doc/modules/linear_model.rst | 8 ++++---- doc/modules/permutation_importance.rst | 4 ++-- doc/modules/preprocessing.rst | 10 ++++------ 5 files changed, 18 insertions(+), 24 deletions(-) diff --git a/doc/modules/clustering.rst b/doc/modules/clustering.rst index ac023d993ae74..76d4079c51146 100644 --- a/doc/modules/clustering.rst +++ b/doc/modules/clustering.rst @@ -1702,10 +1702,9 @@ cluster analysis. .. topic:: References - * Peter J. Rousseeuw (1987). "Silhouettes: a Graphical Aid to the - Interpretation and Validation of Cluster Analysis". Computational - and Applied Mathematics 20: 53–65. - :doi:`doi:10.1016/0377-0427(87)90125-7 <10.1016/0377-0427(87)90125-7>` + * Peter J. Rousseeuw (1987). :doi:`"Silhouettes: a Graphical Aid to the + Interpretation and Validation of Cluster Analysis"<10.1016/0377-0427(87)90125-7>` + . Computational and Applied Mathematics 20: 53–65. Advantages @@ -1804,8 +1803,7 @@ number of points in cluster :math:`q`. * Caliński, T., & Harabasz, J. (1974). `"A Dendrite Method for Cluster Analysis" `_. - Communications in Statistics-theory and Methods 3: 1-27. - :doi:`doi:10.1080/03610927408827101 <10.1080/03610927408827101>`. + :doi:`Communications in Statistics-theory and Methods 3: 1-27 <10.1080/03610927408827101>`. .. _davies-bouldin_index: @@ -1879,15 +1877,13 @@ Then the Davies-Bouldin index is defined as: .. topic:: References * Davies, David L.; Bouldin, Donald W. (1979). - "A Cluster Separation Measure" + :doi:`"A Cluster Separation Measure" <10.1109/TPAMI.1979.4766909>` IEEE Transactions on Pattern Analysis and Machine Intelligence. PAMI-1 (2): 224-227. - :doi:`doi:10.1109/TPAMI.1979.4766909 <10.1109/TPAMI.1979.4766909>` * Halkidi, Maria; Batistakis, Yannis; Vazirgiannis, Michalis (2001). - "On Clustering Validation Techniques" + :doi:`"On Clustering Validation Techniques" <10.1023/A:1012801612483>` Journal of Intelligent Information Systems, 17(2-3), 107-145. - :doi:`doi:10.1023/A:1012801612483 <10.1023/A:1012801612483>` * `Wikipedia entry for Davies-Bouldin index `_. diff --git a/doc/modules/decomposition.rst b/doc/modules/decomposition.rst index 8713ed5d86db4..54ed20cc36be4 100644 --- a/doc/modules/decomposition.rst +++ b/doc/modules/decomposition.rst @@ -167,9 +167,9 @@ Note: the implementation of ``inverse_transform`` in :class:`PCA` with .. topic:: References: * Algorithm 4.3 in - `"Finding structure with randomness: Stochastic algorithms for + :arxiv:`"Finding structure with randomness: Stochastic algorithms for constructing approximate matrix decompositions" - `_ + <0909.4061>` Halko, et al., 2009 * `"An implementation of a randomized algorithm for principal component diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index 817347791c849..c20654574ad91 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -1492,12 +1492,12 @@ problem. The current implementation is based on `_ Econometrica: journal of the Econometric Society, 33-50. - * Portnoy, S., & Koenker, R. (1997). The Gaussian hare and the Laplacian + * Portnoy, S., & Koenker, R. (1997). :doi:`The Gaussian hare and the Laplacian tortoise: computability of squared-error versus absolute-error estimators. - Statistical Science, 12, 279-300. https://doi.org/10.1214/ss/1030037960 + Statistical Science, 12, 279-300 <10.1214/ss/1030037960>`. - * Koenker, R. (2005). Quantile Regression. - Cambridge University Press. https://doi.org/10.1017/CBO9780511754098 + * Koenker, R. (2005). :doi:`Quantile Regression <10.1017/CBO9780511754098>`. + Cambridge University Press. .. _polynomial_regression: diff --git a/doc/modules/permutation_importance.rst b/doc/modules/permutation_importance.rst index 833c9fb9a696e..816b7a63cec7d 100644 --- a/doc/modules/permutation_importance.rst +++ b/doc/modules/permutation_importance.rst @@ -184,5 +184,5 @@ example: .. topic:: References: - .. [1] L. Breiman, "Random Forests", Machine Learning, 45(1), 5-32, - 2001. https://doi.org/10.1023/A:1010933404324 + .. [1] L. Breiman, :doi:`"Random Forests" <10.1023/A:1010933404324>`, Machine Learning, 45(1), 5-32, + 2001. diff --git a/doc/modules/preprocessing.rst b/doc/modules/preprocessing.rst index 6f29a7eef0d98..0b981a5d8cc66 100644 --- a/doc/modules/preprocessing.rst +++ b/doc/modules/preprocessing.rst @@ -977,13 +977,11 @@ Interestingly, a :class:`SplineTransformer` of ``degree=0`` is the same as .. topic:: References: - * Eilers, P., & Marx, B. (1996). Flexible Smoothing with B-splines and - Penalties. Statist. Sci. 11 (1996), no. 2, 89--121. - :doi:`doi:10.1214/ss/1038425655 <10.1214/ss/1038425655>` + * Eilers, P., & Marx, B. (1996). :doi:`Flexible Smoothing with B-splines and + Penalties <10.1214/ss/1038425655>`. Statist. Sci. 11 (1996), no. 2, 89--121. - * Perperoglou, A., Sauerbrei, W., Abrahamowicz, M. et al. A review of - spline function procedures in R. BMC Med Res Methodol 19, 46 (2019). - :doi:`doi:10.1186/s12874-019-0666-3 <10.1186/s12874-019-0666-3>` + * Perperoglou, A., Sauerbrei, W., Abrahamowicz, M. et al. :doi:`A review of + spline function procedures in R <10.1186/s12874-019-0666-3>`. BMC Med Res Methodol 19, 46 (2019). .. _function_transformer: From a0094e71ddce03d356ee592b6eb24ca10648f90f Mon Sep 17 00:00:00 2001 From: puhuk Date: Sat, 9 Oct 2021 01:21:42 +0900 Subject: [PATCH 11/15] Update with feedback --- doc/modules/linear_model.rst | 4 ++- doc/modules/model_evaluation.rst | 5 ++-- doc/modules/permutation_importance.rst | 4 +-- doc/modules/preprocessing.rst | 3 +- doc/sphinxext/doi_role.py | 41 +++++++++++++------------- 5 files changed, 30 insertions(+), 27 deletions(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index c20654574ad91..18e1bf468dc62 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -934,7 +934,9 @@ to warm-starting (see :term:`Glossary `). .. [6] Mark Schmidt, Nicolas Le Roux, and Francis Bach: `Minimizing Finite Sums with the Stochastic Average Gradient. `_ - .. [7] Aaron Defazio, Francis Bach, Simon Lacoste-Julien: :arxiv:`SAGA: A Fast Incremental Gradient Method With Support for Non-Strongly Convex Composite Objectives. <1407.0202>` + .. [7] Aaron Defazio, Francis Bach, Simon Lacoste-Julien: + :arxiv:`SAGA: A Fast Incremental Gradient Method With Support for + Non-Strongly Convex Composite Objectives. <1407.0202>` .. [8] https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm diff --git a/doc/modules/model_evaluation.rst b/doc/modules/model_evaluation.rst index 073df7b445bdc..730b094581276 100644 --- a/doc/modules/model_evaluation.rst +++ b/doc/modules/model_evaluation.rst @@ -563,8 +563,9 @@ or *informedness*. Machine Learning for Predictive Data Analytics: Algorithms, Worked Examples, and Case Studies `_, 2015. - .. [Urbanowicz2015] Urbanowicz R.J., Moore, J.H. :doi:`ExSTraCS 2.0: description and evaluation of a scalable learning - classifier system <10.1007/s12065-015-0128-8>`, Evol. Intel. (2015) 8: 89. + .. [Urbanowicz2015] Urbanowicz R.J., Moore, J.H. :doi:`ExSTraCS 2.0: description + and evaluation of a scalable learning classifier + system <10.1007/s12065-015-0128-8>`, Evol. Intel. (2015) 8: 89. .. _cohen_kappa: diff --git a/doc/modules/permutation_importance.rst b/doc/modules/permutation_importance.rst index 816b7a63cec7d..477a5cf3fdbbc 100644 --- a/doc/modules/permutation_importance.rst +++ b/doc/modules/permutation_importance.rst @@ -184,5 +184,5 @@ example: .. topic:: References: - .. [1] L. Breiman, :doi:`"Random Forests" <10.1023/A:1010933404324>`, Machine Learning, 45(1), 5-32, - 2001. + .. [1] L. Breiman, :doi:`"Random Forests" <10.1023/A:1010933404324>`, + Machine Learning, 45(1), 5-32, 2001. diff --git a/doc/modules/preprocessing.rst b/doc/modules/preprocessing.rst index 0b981a5d8cc66..035f2b90203ca 100644 --- a/doc/modules/preprocessing.rst +++ b/doc/modules/preprocessing.rst @@ -981,7 +981,8 @@ Interestingly, a :class:`SplineTransformer` of ``degree=0`` is the same as Penalties <10.1214/ss/1038425655>`. Statist. Sci. 11 (1996), no. 2, 89--121. * Perperoglou, A., Sauerbrei, W., Abrahamowicz, M. et al. :doi:`A review of - spline function procedures in R <10.1186/s12874-019-0666-3>`. BMC Med Res Methodol 19, 46 (2019). + spline function procedures in R <10.1186/s12874-019-0666-3>`. + BMC Med Res Methodol 19, 46 (2019). .. _function_transformer: diff --git a/doc/sphinxext/doi_role.py b/doc/sphinxext/doi_role.py index 10f6fc7a0df1c..319b99c6390bf 100644 --- a/doc/sphinxext/doi_role.py +++ b/doc/sphinxext/doi_role.py @@ -19,32 +19,31 @@ from sphinx.util.nodes import split_explicit_title - -def doi_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): - text = utils.unescape(text) - has_explicit_title, title, part = split_explicit_title(text) - full_url = "https://doi.org/" + part - if not has_explicit_title: - title = "DOI:" + part - pnode = nodes.reference(title, title, internal=False, refuri=full_url) - return [pnode], [] - - -def arxiv_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): +def reference_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): text = utils.unescape(text) has_explicit_title, title, part = split_explicit_title(text) - full_url = "https://arxiv.org/abs/" + part - if not has_explicit_title: - title = "arXiv:" + part - pnode = nodes.reference(title, title, internal=False, refuri=full_url) - return [pnode], [] + if typ in ["arXiv", "arxiv"]: + full_url = "https://arxiv.org/abs/" + part + if not has_explicit_title: + title = "arXiv:" + part + pnode = nodes.reference(title, title, internal=False, refuri=full_url) + return [pnode], [] + + if typ in ["doi", "DOI"]: + full_url = "https://doi.org/" + part + if not has_explicit_title: + title = "DOI:" + part + pnode = nodes.reference(title, title, internal=False, refuri=full_url) + return [pnode], [] + + def setup_link_role(app): - app.add_role("doi", doi_role, override=True) - app.add_role("DOI", doi_role, override=True) - app.add_role("arXiv", arxiv_role, override=True) - app.add_role("arxiv", arxiv_role, override=True) + app.add_role("arxiv", reference_role, override=True) + app.add_role("arXiv", reference_role, override=True) + app.add_role("doi", reference_role, override=True) + app.add_role("DOI", reference_role, override=True) def setup(app): From dabe8438b5d39c8cfda09f4fbe5b0e446775f3a9 Mon Sep 17 00:00:00 2001 From: puhuk Date: Sat, 9 Oct 2021 01:26:38 +0900 Subject: [PATCH 12/15] Update doi_role.py --- doc/sphinxext/doi_role.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/sphinxext/doi_role.py b/doc/sphinxext/doi_role.py index 319b99c6390bf..3bf9e4f3b0fe1 100644 --- a/doc/sphinxext/doi_role.py +++ b/doc/sphinxext/doi_role.py @@ -19,6 +19,7 @@ from sphinx.util.nodes import split_explicit_title + def reference_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): text = utils.unescape(text) has_explicit_title, title, part = split_explicit_title(text) @@ -29,15 +30,14 @@ def reference_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): title = "arXiv:" + part pnode = nodes.reference(title, title, internal=False, refuri=full_url) return [pnode], [] - + if typ in ["doi", "DOI"]: full_url = "https://doi.org/" + part if not has_explicit_title: title = "DOI:" + part pnode = nodes.reference(title, title, internal=False, refuri=full_url) return [pnode], [] - - + def setup_link_role(app): app.add_role("arxiv", reference_role, override=True) From 8b6623699e149ae79851e6508239af152302cc48 Mon Sep 17 00:00:00 2001 From: puhuk Date: Mon, 11 Oct 2021 16:14:57 +0900 Subject: [PATCH 13/15] Update doi_role.py --- doc/sphinxext/doi_role.py | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/doc/sphinxext/doi_role.py b/doc/sphinxext/doi_role.py index 3bf9e4f3b0fe1..8b0883ba64f10 100644 --- a/doc/sphinxext/doi_role.py +++ b/doc/sphinxext/doi_role.py @@ -24,19 +24,26 @@ def reference_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): text = utils.unescape(text) has_explicit_title, title, part = split_explicit_title(text) - if typ in ["arXiv", "arxiv"]: - full_url = "https://arxiv.org/abs/" + part - if not has_explicit_title: - title = "arXiv:" + part - pnode = nodes.reference(title, title, internal=False, refuri=full_url) - return [pnode], [] - - if typ in ["doi", "DOI"]: - full_url = "https://doi.org/" + part - if not has_explicit_title: - title = "DOI:" + part - pnode = nodes.reference(title, title, internal=False, refuri=full_url) - return [pnode], [] + typ = typ.lower() + + full_url_prefixes = { + "arxiv": "https://arxiv.org/abs/", + "doi": "https://doi.org/", + } + + title_prefixes = { + "arxiv": "arXiv:", + "doi": "DOI:", + } + + full_url = f"{full_url_prefixes[typ]}{part}" + + if not has_explicit_title: + title = f"{title_prefixes[typ]}{part}" + + pnode = nodes.reference(title, title, internal=False, refuri=full_url) + + return [pnode], [] def setup_link_role(app): From 3182fac05e69f735aa2c25fe72f12df72fe96bb7 Mon Sep 17 00:00:00 2001 From: puhuk Date: Mon, 11 Oct 2021 16:19:15 +0900 Subject: [PATCH 14/15] Update doi_role.py --- doc/sphinxext/doi_role.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/doc/sphinxext/doi_role.py b/doc/sphinxext/doi_role.py index 8b0883ba64f10..d2b4aed0a9652 100644 --- a/doc/sphinxext/doi_role.py +++ b/doc/sphinxext/doi_role.py @@ -26,23 +26,17 @@ def reference_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): typ = typ.lower() - full_url_prefixes = { - "arxiv": "https://arxiv.org/abs/", - "doi": "https://doi.org/", - } + full_url_prefixes = {"arxiv": "https://arxiv.org/abs/", "doi": "https://doi.org/"} - title_prefixes = { - "arxiv": "arXiv:", - "doi": "DOI:", - } + title_prefixes = {"arxiv": "arXiv:", "doi": "DOI:"} full_url = f"{full_url_prefixes[typ]}{part}" if not has_explicit_title: - title = f"{title_prefixes[typ]}{part}" - + title = f"{title_prefixes[typ]}{part}" + pnode = nodes.reference(title, title, internal=False, refuri=full_url) - + return [pnode], [] From bcdc6d7a04d4dad5e3ebcab7b8f795caae888384 Mon Sep 17 00:00:00 2001 From: puhuk Date: Mon, 11 Oct 2021 20:42:38 +0900 Subject: [PATCH 15/15] Update doi_role.py --- doc/sphinxext/doi_role.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/doc/sphinxext/doi_role.py b/doc/sphinxext/doi_role.py index d2b4aed0a9652..f851a12ec69ea 100644 --- a/doc/sphinxext/doi_role.py +++ b/doc/sphinxext/doi_role.py @@ -23,21 +23,18 @@ def reference_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): text = utils.unescape(text) has_explicit_title, title, part = split_explicit_title(text) - - typ = typ.lower() - - full_url_prefixes = {"arxiv": "https://arxiv.org/abs/", "doi": "https://doi.org/"} - - title_prefixes = {"arxiv": "arXiv:", "doi": "DOI:"} - - full_url = f"{full_url_prefixes[typ]}{part}" - - if not has_explicit_title: - title = f"{title_prefixes[typ]}{part}" - - pnode = nodes.reference(title, title, internal=False, refuri=full_url) - - return [pnode], [] + if typ in ["arXiv", "arxiv"]: + full_url = "https://arxiv.org/abs/" + part + if not has_explicit_title: + title = "arXiv:" + part + pnode = nodes.reference(title, title, internal=False, refuri=full_url) + return [pnode], [] + if typ in ["doi", "DOI"]: + full_url = "https://doi.org/" + part + if not has_explicit_title: + title = "DOI:" + part + pnode = nodes.reference(title, title, internal=False, refuri=full_url) + return [pnode], [] def setup_link_role(app):