Predict probabilities for multiclass problems


#1

Hello,

I have a multiclass problem I am trying to solve with xgboost and SM HPO. For that after the HPO is done I load the model using pickle to do the predictions. However, those come as hard-labels rather than probabilities. Is there a way to obtain probabilities as the output after the model has been loaded using pickle?

Thanks


#2

Can you use predict_proba() function ?


#3

No we can not. Throws an error saying that the method is not implemented ( I think it is only implemented for the sklearn interface). We solved it by changing the objective from “multi:softmax” to “multi:sotfprob”.


#4

Ah I see what’s going on. Yes, multi:softprob is the correct objective for your use case.