Can I create an objective based on probability for muticlass problem?


#1

Say, I want to classify low, middle, high three classes. A sample is low, and I want to assign [0.5,0.1,0.4] more loss than [0.5,0.4,0.1]. Is this possible?


#2

I don’t think I understand your question. Did you encounter difficulties using multi:softprob objective?


#3

I want to use an objective function which consider middle is a better guess than high when the true value is low. I tried with softprob with a 5 classes problem. The highest output is correct around 1/3 overall, but the average probability for correct class is 0.2, which is no better than guess. So I want to try some custom objective.


#4

See https://github.com/dmlc/xgboost/issues/4288 for caveats when using customized objective with multiclass classification.