-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[python-package] early stopping min_delta (fixes #2526) #4580
[python-package] early stopping min_delta (fixes #2526) #4580
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I left a few preliminary comments.
@jmoralez by the way, since you just joined...we use a bot to create release notes automatically based on the set of pull requests merged between git tags. That bot chooses which section of the release notes to put a change in based on the use of specific labels. LightGBM/.github/release-drafter.yml Lines 4 to 15 in 3942126
So every PR needs to be assigned a label from that set. I'd call this one |
I can give it a shot once this is done. |
In general the proposed solution looks good to me. Thanks for the PR! In dmlc/xgboost#7137 (comment) it is said that
I believe all Please enhance new parameter description with some info about the semantics of expected parameter types. It should help users avoid this error at the time of writing their code but not after they read this error message.
Something like the following:
|
enhance parameter description update tests
@StrikerRUS I've changed the name to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM. Thank you! @jmoralez
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay!
Everything is great, thanks a lot!
I just think we should allow users to silence debugging messages. Moreover, we already have verbose
argument for this callback.
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for implementing this feature! LGTM!
Just noticed that two my suggestions from the previous review were not so neat.
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
@StrikerRUS should I merge this? |
TBH, I'm not sure. We decided to give some time (about 2 weeks or so) after the
This PR touches existing code and may possibly change current logic. I'd better wait a little bit before merging it. |
I agree. v3.3.1 was only merged 6 days ago (#4715 (comment)), so I think we should wait another week for this PR. |
I agree. |
Great work on this, @jmoralez !!! |
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
This aims to close #2526 by providing an additional argument
min_delta
to the early stopping callback, which allows to perform early stopping when the score doesn't improve by at least thatmin_delta
instopping_rounds
iterations. The default value is 0, so the current behavior is maintained.In the case for multiple metrics the user can provide a single delta for all metrics or a specific delta for each metric. The handling of all the cases (single metric, multiple metrics, multiple metrics considering first only) can be a bit cumbersome so I'm open to suggestions on how to handle them.