8000 DOC Ensures that AdaBoostRegressor passes numpydoc validation (#20400) · scikit-learn/scikit-learn@f443f08 · GitHub
[go: up one dir, main page]

Skip to content

Commit f443f08

Browse files
DOC Ensures that AdaBoostRegressor passes numpydoc validation (#20400)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent 383b53f commit f443f08

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# List of modules ignored when checking for numpydoc validation.
1111
DOCSTRING_IGNORE_LIST = [
12-
"AdaBoostRegressor",
1312
"AdditiveChi2Sampler",
1413
"AffinityPropagation",
1514
"AgglomerativeClustering",

sklearn/ensemble/_weight_boosting.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ class AdaBoostRegressor(RegressorMixin, BaseWeightBoosting):
924924
The maximum number of estimators at which boosting is terminated.
925925
In case of perfect fit, the learning procedure is stopped early.
926926
927-
learning_rate : float, default=1.
927+
learning_rate : float, default=1.0
928928
Weight applied to each classifier at each boosting iteration. A higher
929929
learning rate increases the contribution of each classifier. There is
930930
a trade-off between the `learning_rate` and `n_estimators` parameters.
@@ -969,6 +969,19 @@ class AdaBoostRegressor(RegressorMixin, BaseWeightBoosting):
969969
970970
.. versionadded:: 0.24
971971
972+
See Also
973+
--------
974+
AdaBoostClassifier : An AdaBoost classifier.
975+
GradientBoostingRegressor : Gradient Boosting Classification Tree.
976+
sklearn.tree.DecisionTreeRegressor : A decision tree regressor.
977+
978+
References
979+
----------
980+
.. [1] Y. Freund, R. Schapire, "A Decision-Theoretic Generalization of
981+
on-Line Learning and an Application to Boosting", 1995.
982+
983+
.. [2] H. Drucker, "Improving Regressors using Boosting Techniques", 1997.
984+
972985
Examples
973986
--------
974987
>>> from sklearn.ensemble import AdaBoostRegressor
@@ -982,19 +995,6 @@ class AdaBoostRegressor(RegressorMixin, BaseWeightBoosting):
982995
array([4.7972...])
983996
>>> regr.score(X, y)
984997
0.9771...
985-
986-
See Also
987-
--------
988-
AdaBoostClassifier, GradientBoostingRegressor,
989-
sklearn.tree.DecisionTreeRegressor
990-
991-
References
992-
----------
993-
.. [1] Y. Freund, R. Schapire, "A Decision-Theoretic Generalization of
994-
on-Line Learning and an Application to Boosting", 1995.
995-
996-
.. [2] H. Drucker, "Improving Regressors using Boosting Techniques", 1997.
997-
998998
"""
999999

10001000
def __init__(
@@ -1036,6 +1036,7 @@ def fit(self, X, y, sample_weight=None):
10361036
Returns
10371037
-------
10381038
self : object
1039+
Fitted AdaBoostRegressor estimator.
10391040
"""
10401041
# Check loss
10411042
if self.loss not in ("linear", "square", "exponential"):

0 commit comments

Comments
 (0)
0