Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DOC replace deviance by loss in docstring of GradientBoosting #25968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2023
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 22 sklearn/ensemble/_gb.py
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.