1

Ive been working on an XGBoost Classifier with 5 classes for which I used to get the confidence of each prediction from the predict_proba() function (total sum of the confidences would add up to 1, easy enough). Now that Ive switched to a Binary classification, the predict_proba() returns (e.g.) this: [[-1.0231217 2.1702857]]

I am extremely confused as to what exactly is being measured in this matrix or if Ive done something wrong when training the model. How would I go about finding out the prediction confidence for each prediction ?

my model parameters in case its something obvious I've missed during training:

xgb1 = XGBClassifier(learning_rate= 0.0125,
n_estimators=1000,    
#n_jobs = -1,
max_depth=6,
min_child_weight=1,
gamma=0.1,
subsample=0.7,
colsample_bytree=0.6,
objective='multi:softmax' ,
nthread=4,
num_class=2,
seed=42,
use_label_encoder=False,
eval_metric='mlogloss',
tree_method = 'gpu_hist',
gpu_id = 0)

1 Answers1

0

One thing I noticed is, you can change objective='binary:logistic'. You can try it, but not sure whether this is the reason.

And it will be helpful if you add, how you use the predict_proba() function. To output probabilities, predict_proba() second argument output_margin should be false.