Omi
Omi

Reputation: 75

How to interpret thresholds of ROC AUC Curves for Decision Trees?

When using a discrete classifier like decision tree, we get a single point (FPR, TPR) by through the confusion matrix, now when I try to plot ROC AUC curve, I get thresholds :

roc_curve(y_test,mod.predict(X_test))

Output :

(array([  0.00000000e+00,   5.92624518e-04,   1.00000000e+00]),
 array([ 0.        ,  0.11766772,  1.        ]),
 array([ 2.,  1.,  0.]))

threshold = [2.,1.,0.,]

I am unable to interpret these thresholds, how do I interpret them to find TPR and FPR?

Upvotes: 1

Views: 517

Answers (1)

fadil eldin
fadil eldin

Reputation: 143

Look here sklearn.metrics.roc_curve.html

The first array of your roc_curve return is fpr, the second is tpr and the thirs is threshold
when you plot fpr (X) on tpr (Y) for each threshold yo get the ROC curve

Upvotes: 2

Related Questions