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

multiclassification using mlogloss objective function #10832

Open
sxpyggy opened this issue Sep 20, 2024 · 1 comment
Open

multiclassification using mlogloss objective function #10832

sxpyggy opened this issue Sep 20, 2024 · 1 comment

Comments

@sxpyggy
Copy link

sxpyggy commented Sep 20, 2024

I would like to know the exact expression of multi:softprob in terms of probabilities and labels. What is the difference between multi:softprob and mlogloss? Can I use the mlogloss objective function when boosting a multi-classification task?

@gdubs89
Copy link

gdubs89 commented Sep 27, 2024

To be clear, multi:softprob is a loss function. My understanding is that it's functionallty equivalent to multi:softmax but it somehow differs in the shape of the output of the predict_proba method once the model is fit. So let's not worry about that detail.

So basically, multi:softprob / multi:softmax are the multi-class equivalents of using binary:logistic loss when training a binary classifier, and mlogloss is the multi-class equivalent of using logloss as your eval metric.

I believe that multi:softmax and mlogloss are numerically equivalent, that is to say that if after X training iterations, your training Loss=x, then if you track your eval_metric on the training set, you'll get the same number (it's not even the case that one is the negative of the other)

The reason they have this separation, is that you can use eval metrics that are not suitable as loss functions because they're not twice differentiable, like accuracy. So it makes senes to have a list of permissible loss functions, and a list of eval metrics, although for eval metrics that have a corresponding loss function, they could have overloaded the naming

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

No branches or pull requests

2 participants