-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
xgboost learner inverts labels #32
Comments
@berndbischl @pat-s this also affects mlr2. |
Thanks for reporting. |
Why were the labels inverted in the first place? |
xgboost needs the labels translated to However, xgboost supports stuff like early stopping where it calculates performance measures internally to decide whether to terminate or keep going. And for some binary classification measures it matters which class is the positive class (PPV, precision, recall, ...). |
This obviously causes problems if one wants to extract the underlying xgboost model (in my case, to convert into PMML), but I don't see an easy way around that on the mlr side. (I've brought it up for r2pmml at jpmml/r2pmml#46 (comment).) |
@bmreiniger Are you still encountering problems in mlr3? |
@mllg Yes. There's an additional weirdness around column order. Here's the mlr3 adaptation of what I posted over at r2pmml:
|
mlr3learners/R/LearnerClassifXgboost.R
Line 102 in b48679b
The match line for extracting labels from the task inverts the labels which messes with measures on binary tasks. This causes issues when supplying a watchlist to an xgb task for early stopping.
Suggested:
The text was updated successfully, but these errors were encountered: