Skip to content

respect best_iteration for early-stopped xgboost models - #44

Merged
jemus42 merged 1 commit into
masterfrom
early-stopping
Jul 18, 2026
Merged

respect best_iteration for early-stopped xgboost models#44
jemus42 merged 1 commit into
masterfrom
early-stopping

Conversation

@jemus42

@jemus42 jemus42 commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

predict() on an early-stopped booster defaults to trees up to best_iteration, but glex decomposed the full dump, so the components did not sum to the prediction. Filter the tree table to the same subset predict() evaluates, translating rounds to trees to account for multiclass models and num_parallel_tree.

Closes #42.

predict() on an early-stopped booster defaults to trees up to
best_iteration, but glex decomposed the full dump, so the components
did not sum to the prediction. Filter the tree table to the same
subset predict() evaluates, translating rounds to trees to account
for multiclass models and num_parallel_tree.

Closes #42.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jemus42
jemus42 merged commit a071697 into master Jul 18, 2026
6 checks passed
@jemus42
jemus42 deleted the early-stopping branch July 18, 2026 01:47
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.

Respect early stopping

1 participant