Why does roc_auc_score reject the hard 0/1 labels returned by predict?
Correct answer
C. It needs continuous scores, because one threshold gives a single ROC point
18 views
C. It needs continuous scores, because one threshold gives a single ROC point
18 views
roc_auc_score sweeps every threshold, so it needs a ranking score such as predict_proba or decision_function rather than the thresholded labels returned by predict. With hard labels there is only one operating point, and the AUC collapses to a value determined by accuracy alone. That is also why AUC is threshold-independent while accuracy is not.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is C? Ask here and get an explanation.