MLCrack

    CLASSICAL ML · INTERVIEW QUESTION

    What is the ROC curve and AUC? What are their limitations?

    🟡 intermediate · Supervised Learning

    Hint: True positive rate vs false positive rate at different thresholds.

    Answer

    ROC curve plots TPR (recall) vs FPR (1-specificity) at all classification thresholds. AUC (Area Under Curve): probability that a randomly chosen positive ranks higher than a randomly chosen negative. AUC = 0.5 (random), 1.0 (perfect).

    Benefits: threshold-independent, scale-invariant, works well for balanced data.

    Limitations:

    1. Misleading for imbalanced data (high AUC despite poor performance on minority class)
    2. Averages over all thresholds, many of which are irrelevant
    3. Doesn't account for calibration.

    For imbalanced data: use Precision-Recall curve and AUPRC instead — focuses on the positive class. Calibration: even with good AUC, predicted probabilities may not match true frequencies.

    Use calibration curves (reliability diagrams) and Brier score to assess.