-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Make XGBoostClassifier compatible with any class labels #11727
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: master
Are you sure you want to change the base?
Conversation
|
Thank you for the feature addition. For the sklearn interface, we need to consider some other things for consistency:
Related: #11256 |
|
Hello
According to my testing, I had no issue saving and loading up the model
Indeed, this can be blocking. If the user need to rely on encoded values, they can still do their own class encoding before passing it to xgboost. Though most of the time it is easy to bring compatibility with class labels, or to use soft predictions instead. |
It's about loading the model and then the encoder still needs to be valid. The output of the prediction function needs to be the labels. |
|
Thank you for sharing. I meant the |
|
It's more of a case-by-case issue. But in general, this feature needs a lot more consideration than simply adding an encoder. |


Description
Add feature to encode class labels if they are not correct.
Current behaviour
error
New behaviour
output None without error