8000 DOC replace deviance by loss in docstring of GradientBoosting by lorentzenchr · Pull Request #25968 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions sklearn/ensemble/_gb.py
8000
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ def _fit_stages(
X_csr,
)

# track deviance (= loss)
# track loss
if do_oob:
self.train_score_[i] = loss_(
y[sample_mask],
Expand Down Expand Up @@ -1056,28 +1056,28 @@ class GradientBoostingClassifier(ClassifierMixin, BaseGradientBoosting):
:func:`sklearn.inspection.permutation_importance` as an alternative.

oob_improvement_ : ndarray of shape (n_estimators,)
The improvement in loss (= deviance) on the out-of-bag samples
The improvement in loss on the out-of-bag samples
relative to the previous iteration.
``oob_improvement_[0]`` is the improvement in
loss of the first stage over the ``init`` estimator.
Only available if ``subsample < 1.0``.

oob_scores_ : ndarray of shape (n_estimators,)
The full history of the loss (= deviance) values on the out-of-bag
The full history of the loss values on the out-of-bag
samples. Only available if `subsample < 1.0`.

.. versionadded:: 1.3

oob_score_ : float
The last value of the loss (= deviance) on the out-of-bag samples. It is
The last value of the loss on the out-of-bag samples. It is
the same as `oob_scores_[-1]`. Only available if `subsample < 1.0`.

.. versionadded:: 1.3

train_score_ : ndarray of shape (n_estimators,)
The i-th score ``train_score_[i]`` is the deviance (= loss) of the
The i-th score ``train_score_[i]`` is the loss of the
model at iteration ``i`` on the in-bag sample.
If ``subsample == 1`` this is the deviance on the training data.
If ``subsample == 1`` this is the loss on the training data.

init_ : estimator
The estimator that provides the initial predictions.
Expand Down Expand Up @@ -1619,28 +1619,28 @@ class GradientBoostingRegressor(RegressorMixin, BaseGradientBoosting):
:func:`sklearn.inspection.permutation_importance` as an alternative.

oob_improvement_ : ndarray of shape (n_estimators,)
The improvement in loss (= deviance) on the out-of-bag samples
The improvement in loss on the out-of-bag samples
relative to the previous iteration.
``oob_improvement_[0]`` is the improvement in
loss of the first stage over the ``init`` estimator.
Only available if ``subsample < 1.0``.

oob_scores_ : ndarray of shape (n_estimators,)
The full history of the loss (= deviance) values on the out-of-bag
The full history of the loss values on the out-of-bag
samples. Only available if `subsample < 1.0`.

.. versionadded:: 1.3

oob_score_ : float
The last value of the loss (= deviance) on the out-of-bag samples. It is
The last value of the loss on the out-of-bag samples. It is
the same as `oob_scores_[-1]`. Only available if `subsample < 1.0`.

.. versionadded:: 1.3

train_score_ : ndarray of shape (n_estimators,)
The i-th score ``train_score_[i]`` is the deviance (= loss) of the
The i-th score ``train_score_[i]`` is the loss of the
model at iteration ``i`` on the in-bag sample.
If ``subsample == 1`` this is the deviance on the training data.
If ``subsample == 1`` this is the loss on the training data.

init_ : estimator
The estimator that provides the initial predictions.
Expand Down
0