ML basics
ROC vs precision-recall curves
ROC-AUC flatters on imbalanced data; PR curves show what you’ll actually get.
What it is and why it exists
ROC plots true-positive vs false-positive rate across thresholds; PR plots precision vs recall. With rare positives (fraud, attacks, failures), a tiny false-positive rate can still mean most flags are wrong — visible on PR, hidden on ROC.
Quick prototype
—
In production, at scale
Report PR-AUC and the operating point (precision and recall at the chosen threshold) for imbalanced problems.
Vendors and tools
| scikit-learn | roc_curve, precision_recall_curve |
|---|
How it fails
- Celebrating ROC-AUC 0.97 on a 0.5%-positive problem
What the interviewer asks next
Why does ROC mislead with imbalance?
FPR divides by the huge number of negatives, so many false positives still look like a small rate, while precision reveals they outnumber true positives.