-
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
Not able to train with dart
and early_stopping_rounds
#1893
Comments
I think early stopping and dart cannot be used together. To support this, a simple solution is to clone the model of best_iteration at that time, to avoid the updates on it. @StrikerRUS |
The issue here is that he's trying to use the sklearn version of LightGBM that doesn't support early stopping (from my understanding). I have used early stopping and dart with no issues for the past couple months on multiple models. However, I do have to set the early stopping rounds higher than normal because there is cases where the validation score will rise, then drop then start rising again. I have to use a higher learning rate as well so it doesn't take forever to run. |
I get the same "problem" then using the non-sklearn syntax. |
@RickoClausen do you have "boost_from_average" = False? |
yeah, this fix should be in R package too. |
ping @Laurae2 and @jameslamb for R-fix |
For R we can add a simple check here: https://github.com/Microsoft/LightGBM/blob/master/R-package/R/lgb.train.R#L205-L209 Will try to do it by the end of this week. |
@Laurae2 It seems that this check will not solve the issue when users create early stopping callback by themselves. |
ping @Laurae2 @jameslamb for R's fix |
Thank you for the ping, will pick it up soon. |
Any updates? |
R-package should be fixed in #2443. |
Thanks @StrikerRUS . Sorry, I should have come and closed this |
Environment info
Operating System: MacOS Mojave and Ubuntu
CPU/GPU model: CPU
C++/Python/R version: Python
Error message
When using the
dart
booting type the model is not trained when applyingearly_stopping_rounds
.The rmse after training is not the same as it was at the stopping point in the training.
When I use
gbdt
the model trains fine, and I am able to reproduce the rmse from the in-training.Reproducible examples
Output:
Thanks for an amazing product! 👍
The text was updated successfully, but these errors were encountered: