ROC curve
/ AR-oh-SEE kurv /
Most classifiers don't just say yes or no — they output a score, like "73 percent likely spam." To get a decision you pick a threshold: above it, call it spam. The ROC curve shows what happens to your two error rates as you slide that threshold from strict to lenient. It is a single picture of every possible threshold at once.
On the curve, the vertical axis is the true positive rate (recall — the fraction of real positives you catch) and the horizontal axis is the false positive rate (the fraction of real negatives you wrongly flag). A perfect model hugs the top-left corner: catching everything real while raising no false alarms. A model that's guessing randomly traces the diagonal line from corner to corner. The further your curve bows up toward that top-left corner, the better it separates the two classes.
The name is a wartime leftover — "receiver operating characteristic" comes from 1940s radar, where operators tuned how readily they'd call a blip an enemy plane. The honest caveat: ROC curves can look reassuringly good even on heavily imbalanced data, because the false positive rate has a huge denominator of negatives to dilute it. When the positive class is rare and precious — fraud, disease — the precision-recall curve usually tells a more truthful story.
Lower the spam threshold step by step. At a strict setting you catch 50% of spam with 1% false alarms (bottom-left). Loosen it and you catch 90% of spam but now 20% of real mail gets flagged (upper-right). Each setting is one point; tracing them all draws the ROC curve.
One curve summarizes the recall-vs-false-alarm trade-off at every threshold.
A common trap: people quote ROC AUC on rare-event problems where it flatters the model. On a 1-in-1000 fraud task, a model can post a beautiful ROC curve while its precision in practice is dismal. Match the curve to the base rate.