This is the code I used :
or2 = LogisticAT()
or2.fit(X_tr1, y_tr1.values, sample_weight = weight)
y_preds = or2.predict(X_val1)
lr_prob = or2.predict_proba(X_val1)
pd.set_option('display.float_format', lambda x: '%.5f' % x)
lr_df = pd.DataFrame(lr_prob)
lr_df['pred'] = y_preds
lr_df.columns = ['prob_0', 'prob_1','prob_2','prob_3','pred']
lr_df['actual'] = y_val1['TARGET'].values
lr_df.tail()
output for one value in validation data
There are 4 categories in the target - 0 to 3.
The questions are :
- What do the values 0.33 , 0.31 , 0.22 , 0.14 signify ?
- Why is the prediction value 1 , when prob_0 is maximum ?
- How do I calculate cut-off threshold values for each target class?
Thanks
question from:
https://stackoverflow.com/questions/65922528/how-to-interpret-predict-proba-in-mord-logisticat 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…