Skip to content

Commit 539f488

Browse files
committed
DOC GradientBoostingX.estimators_ docstring shape.
1 parent a76b5be commit 539f488

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sklearn/ensemble/gradient_boosting.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,12 +1268,14 @@ class GradientBoostingClassifier(BaseGradientBoosting, ClassifierMixin):
12681268
loss_ : LossFunction
12691269
The concrete ``LossFunction`` object.
12701270
1271-
`init` : BaseEstimator
1271+
init : BaseEstimator
12721272
The estimator that provides the initial predictions.
12731273
Set via the ``init`` argument or ``loss.init_estimator``.
12741274
1275-
estimators_ : list of DecisionTreeRegressor
1276-
The collection of fitted sub-estimators.
1275+
estimators_ : ndarray of DecisionTreeRegressor, shape = [n_estimators, loss_.K]
1276+
The collection of fitted sub-estimators. ``loss_.K`` is 1 for binary
1277+
classification, otherwise n_classes.
1278+
12771279
12781280
See also
12791281
--------
@@ -1544,7 +1546,7 @@ class GradientBoostingRegressor(BaseGradientBoosting, RegressorMixin):
15441546
The estimator that provides the initial predictions.
15451547
Set via the ``init`` argument or ``loss.init_estimator``.
15461548
1547-
estimators_ : list of DecisionTreeRegressor
1549+
estimators_ : ndarray of DecisionTreeRegressor, shape = [n_estimators, 1]
15481550
The collection of fitted sub-estimators.
15491551
15501552
See also

0 commit comments

Comments
 (0)