-
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
[Feature Request] Auto early stopping in Sklearn API #3313
Comments
lgb.cv supports early stopping, does it meet your request? |
@guolinke I was actually looking for the same feature within the Sklearn API. Changed the title now |
This is how sklearn's Enabling this sort of functionality would allow a significant speedup in hyperparameter searching by taking advantage of both of sklearn's Ideally this would be implemented as an option of course, and not replace the existing behavior of course. |
For your consideration, we did have a discussion about this with the scikit-learn maintainers in #2270. Using early stopping with a random subset of the data (not a validation set you create yourself) can lead to misleading results, because of information leaking from the training data to the validation data. That being said...I personally favor adding automatic early stopping to the scikit-learn interface specifically, even if that means that we use But I am not a Python maintainer here, so will defer to @guolinke and others. |
Thanks @jameslamb - that's helpful background, and I see the concerns (especially since you can't pass a cv object into I would find this functionality helpful despite these drawbacks, but it is obviously not essential. |
@guolinke is it possible to add this functionality like @jameslamb mentioned? |
But please note that things might change:
I expect some changes in the sklearn public API in the (near) future. |
Closed in favor of being in #2302. We decided to keep all feature requests in one place. Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature. |
I have been working on this feature lately, it would be great if someone could review it :) |
Timely PR, was looking for exactly this feature 😄 . @ClaudioSalvatoreArcidiacono seems like your PR passes all CI but is blocked for reviewing until you sign your commits the way the maintainers expect it. Would be great if this PR could pass the finish line before new merge conflicts arrive. |
This issue has been automatically locked since there has not been any recent activity since it was closed. |
Sorry, this was locked accidentally. Just unlocked it. |
Is it possible to perform early stopping using cross-validation or automatically sampling data from the provided train set without explicitly specifying an eval set?
The text was updated successfully, but these errors were encountered: