1. Home
  2. Data Science
  3. Scikit-learn
  4. Why should roc_auc_score receive predict_proba output…

Added 30 Nov -0001

Why should roc_auc_score receive predict_proba output rather than hard class labels?

  1. AUC needs ranked scores to sweep decision thresholds Correct answer
  2. Probability output is the only format it accepts numerically
  3. Hard labels invert the meaning of the curve
  4. Probabilities remove the effect of class imbalance

Correct answer

A. AUC needs ranked scores to sweep decision thresholds

15 views

MCQSEXAM

Explanation

ROC AUC measures how well a model ranks positives above negatives across every possible threshold, so it needs continuous scores; passing 0 and 1 labels collapses the curve to a single operating point. Use predict_proba(X)[:, 1], the probability of the positive class, or decision_function where available. The same reasoning applies to average_precision_score, and it explains why a model with strong AUC can still show poor accuracy at a poorly chosen threshold.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Scikit-learn MCQs

Practise all Scikit-learn MCQs

Similar MCQs