-
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
[LightGBM] [Warning] No further splits with positive gain, best gain: -inf #4649
Comments
Thanks very much for using LightGBM!
I think you may have misunderstood what this warning means. It is emitted if the tree-growing process for a specific tree stops before LightGBM/src/treelearner/linear_tree_learner.cpp Lines 100 to 103 in 6d825cd
So there is no inconsistency between the fact that you see this warning and the fact that it appears that the fit to training data and performance on validation data seems to be improving at every iteration. If you inspect the structure of the model after training using You could use the example code in #4561 (comment) as a reference for how to use There's probably an opportunity to make that warning clearer. For example, the Would you find it clearer if this warning had looked like this instead?
|
Thanks @jameslamb for your detail explanation. Indeed, I misunderstand the the warning because it appears at every The first sentence of your suggestion is much more clearer.
But the second sentence, do you mean something like this?
|
yep,exactly! |
That would be awesome. In fact, I've seen many questions and discussions about this warning. Hope the adjusted warning version would make the log clearer for end users. Looking for it in next updating version of LightGBM. Thank you very much James. |
Add the improvement of this warning message as a new feature request. |
Description
I train a binary classification model on a data set having 10,000 rows and 600 features. The warning
[LightGBM] [Warning] No further splits with positive gain, best gain: -inf
appears exactly 10 times in a training having 10num_boost_round
. It is less likely that there is no positive gain right at the first rounds. In addition, theevals_result
shows that theauc
is still improving on both train and validation sets. So I suspect the warning may have some problem.Code:
Result:
evals_result
:Installation
pip install lightgbm
LightGBM version:
Version: 3.2.1
The text was updated successfully, but these errors were encountered: