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

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?

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

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.

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

1 Like