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

base_margin refactoring #319

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

base_margin refactoring #319

wants to merge 4 commits into from

Conversation

bblodfon
Copy link
Contributor

@bblodfon bblodfon commented Nov 4, 2024

@adibender see this PR + two tests for practical examples

base_margin (prediction offset) is now:

  1. used as numeric vector for classif.xgboost => this is how all other learners do it (offset parameter), simpler to implement, currently doesn't work with early stopping (maybe need some help from @sebffischer)
  2. I corrected the implementation for regr.xgboost: base_margin column/feature is removed from during training + prediction from the xgb.DMatrix object as we discussed

I think it would be best to do (1) for both and align with other learners, somehow in the last PR I implemented (2), maybe also because Michel had mentioned this as such and xgboost "understands" it

* use as numeric vector for classif.xgboost
* remove from feature from regr.xgboost during training
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.

1 participant