8000 DOC Ensures that GradientBoostingRegressor passes numpydoc validation… · rth/scikit-learn@1b9e7e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b9e7e8

Browse files
jmloyolaglemaitre
andauthored
DOC Ensures that GradientBoostingRegressor passes numpydoc validation (scikit-learn#20645)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent cd2f015 commit 1b9e7e8

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"GaussianMixture",
3131
"GaussianProcessRegressor",
3232
"GaussianRandomProjection",
33-
"GradientBoostingRegressor",
3433
"GridSearchCV",
3534
"HalvingGridSearchCV",
3635
"HalvingRandomSearchCV",

sklearn/ensemble/_gb.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,6 +1741,16 @@ class GradientBoostingRegressor(RegressorMixin, BaseGradientBoosting):
17411741
split. To obtain a deterministic behaviour during fitting,
17421742
``random_state`` has to be fixed.
17431743
1744+
References
1745+
----------
1746+
J. Friedman, Greedy Function Approximation: A Gradient Boosting
1747+
Machine, The Annals of Statistics, Vol. 29, No. 5, 2001.
1748+
1749+
J. Friedman, Stochastic Gradient Boosting, 1999
1750+
1751+
T. Hastie, R. Tibshirani and J. Friedman.
1752+
Elements of Statistical Learning Ed. 2, Springer, 2009.
1753+
17441754
Examples
17451755
--------
17461756
>>> from sklearn.datasets import make_regression
@@ -1756,16 +1766,6 @@ class GradientBoostingRegressor(RegressorMixin, BaseGradientBoosting):
17561766
array([-61...])
17571767
>>> reg.score(X_test, y_test)
17581768
0.4...
1759-
1760-
References
1761-
----------
1762-
J. Friedman, Greedy Function Approximation: A Gradient Boosting
1763-
Machine, The Annals of Statistics, Vol. 29, No. 5, 2001.
1764-
1765-
J. Friedman, Stochastic Gradient Boosting, 1999
1766-
1767-
T. Hastie, R. Tibshirani and J. Friedman.
1768-
Elements of Statistical Learning Ed. 2, Springer, 2009.
17691769
"""
17701770

17711771
# TODO: remove "ls" in verion 1.2
@@ -1877,8 +1877,8 @@ def staged_predict(self, X):
18771877
``dtype=np.float32`` and if a sparse matrix is provided
18781878
to a sparse ``csr_matrix``.
18791879
1880-
Returns
1881-
-------
1880+
Yields
1881+
------
18821882
y : generator of ndarray of shape (n_samples,)
18831883
The predicted value of the input samples.
18841884
"""

0 commit comments

Comments
 (0)
0