-
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
Different number of trees in CVBooster object between versions 3.3.5 and 4.1.0 #6211
Comments
Hey @dtararuj, thanks for using LightGBM. This is due to #5066. Previously the individual boosters in the CVBooster object would keep all training iterations, regardless of what the best iteration was. So for example if early stopping was performed and the best iteration was 5, previously the boosters had 55 rounds (since you set for bst in model_1.boosters:
bst.save_model(
f'model_{model_name}_cv{i}.txt',
num_iteration=bst.current_iteration(),
) |
ok it makes sense, thank you |
This issue 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. |
Description
Hi, I faced a strange issue. I've tried to create model to predict possitive and negative values as an output.
I am using default objectice, and CV with 3 folds.
When I executed code using lgb==3.3.5 I have many more trees in my model file than when I used newer version.
Using newest version i i have one or two tree in the model .txt file, using oldest version many more.
Is it expected behaviour ?
Related to this I have also worse accuracy.
Reproducible example
The text was updated successfully, but these errors were encountered: