Skip to content

DOC Add link to Early Stopping example in Gradient Boosting #27025

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 10 commits into from
Sep 29, 2023

Conversation

greyisbetter
Copy link
Contributor

@greyisbetter greyisbetter commented Aug 7, 2023

Towards #26927

This adds a reference to example of choosing fewer n_estimators in GradientBoostingClassifier model using Early Stopping technique.

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 902c6ce. Link to the linter CI: here

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also add the link to the parameters in the API docs, i.e. the docstring of the HistGradientBoosting classes.

@greyisbetter
Copy link
Contributor Author

You can also add the link to the parameters in the API docs, i.e. the docstring of the HistGradientBoosting classes.

@adrinjalali, ready to review.

Copy link
Member

@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we need to improve the example on early stopping 😄

@greyisbetter
Copy link
Contributor Author

Now we need to improve the example on early stopping 😄

I'm also thinking something similar

@lorentzenchr
Copy link
Member

@greyisbetter Feel free to open PRs improving this or other examples.

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that the example only uses GradientBoostingClassifier, so this example can only be linked from GradientBoostingClassifier and GradientBoostingRegressor

@greyisbetter
Copy link
Contributor Author

@adrinjalali, Could you please review the recent changes when you have a moment?

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM.

``n_iter_no_change`` consecutive epochs. The split is stratified,
except in a multilabel setting.
If early stopping is False, then the training stops when the training
loss does not improve by more than tol for n_iter_no_change consecutive
passes over the training set.
Only effective when solver='sgd' or 'adam'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-related change to the PR, please revert.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing that out. I've reverted the non-related changes as per your request. Your guidance is greatly appreciated

@adrinjalali adrinjalali merged commit 3aa1054 into scikit-learn:main Sep 29, 2023
@greyisbetter greyisbetter deleted the eg_early_stopping branch September 29, 2023 06:59
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants