softmax vs softprob
Basically, both softmax
and softprob
are used for multi-class classification.
--softmax
outputs one class with the maximum probability of prediction.
--softprob
outputs the probability value of each class you are trying to predict.
multi:softmax: set XGBoost to do multiclass classification using the softmax objective, you also need to set num_class(number of classes) multi:softprob: same as softmax, but output a vector of ndata * nclass, which can be further reshaped to ndata * nclass matrix. The result contains predicted probability of each data point belonging to each class.
param = {'max_depth': 2, 'eta': 1, 'objective': 'multi:softmax', 'num_class': 3}
param = {'max_depth': 2, 'eta': 1, 'objective': 'multi:softprob', 'num_class': 3}
Recommended Posts