Skip to content
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.cv strange results in Random Forest mode #4206

Closed
candalfigomoro opened this issue Apr 20, 2021 · 3 comments
Closed

lightgbm.cv strange results in Random Forest mode #4206

candalfigomoro opened this issue Apr 20, 2021 · 3 comments
Labels

Comments

@candalfigomoro
Copy link

This is basically a continuation of this closed issue: #3387

With lightgbm's cv method, if I use 300 trees in Random Forest mode, I get 300 scores.

In comparison, when I use xgboost's cv method in Random Forest mode, I get just 1 score (this naturally arises from the fact that in xgboost we have decoupled parameters for boosted/parallel trees, see #3128).

What is the intepretation of the 300 scores? Is the 1st score the one I'd get with 1 tree and the 300th score the one I get with a Random Forest of 300 trees?

While for boosting iterations this kind of output makes sense, I think the interpretation of lightgbm's cv results in Random Forest mode is a bit confusing.

@shiyu1994
Copy link
Collaborator

@candalfigomoro Thanks for using LightGBM.

What is the intepretation of the 300 scores? Is the 1st score the one I'd get with 1 tree and the 300th score the one I get with a Random Forest of 300 trees?

Yes, that's correct. The ith value in the list represents the averaged mean or std across the folds using the first i iterations.
This is because rf is treated as a special type of boosting in LightGBM, which does not update the gradients between iterations.

@candalfigomoro
Copy link
Author

@shiyu1994 Thank you!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants