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

fix xgb.model.dt.tree in case where all leaves are negatives #10798

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

jonibr22
Copy link
Contributor

@jonibr22 jonibr22 commented Sep 4, 2024

If all leaves on the model are negative values, xgb.model.dt.tree throws an error saying that the given model is a non-tree model.
However, a model where all leaves are negative is possible if i'm using poisson/gamma objective with few number of rounds.

@trivialfis
Copy link
Member

cc @david-cortes .

@trivialfis trivialfis merged commit 215da76 into dmlc:master Sep 23, 2024
25 of 30 checks passed
@trivialfis
Copy link
Member

Thank you for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants