Quant GT
Browse all lessons
Section 19 · Lesson 19.7

Classification Metrics

Precision, recall, ROC, and PR curves — and which to trust when.

Accuracy alone is misleading on imbalanced data — predicting "no fraud" always gets 99%99\% accuracy if fraud is 1%1\% of cases. Better metrics:

Precision: TP/(TP+FP)\text{TP} / (\text{TP} + \text{FP}). "Of what I flagged, how much was real?"Recall (sensitivity): TP/(TP+FN)\text{TP} / (\text{TP} + \text{FN}). "Of the real positives, how many did I catch?"F1: harmonic mean of precision and recall.ROC curve: TPR vs FPR over all thresholds; AUC summarizes.PR curve: precision vs recall; better than ROC when classes are heavily imbalanced.

Pick the metric to match cost. False alarms on a fraud system are cheap; missed fraud is expensive — recall matters. False alarms in cancer screening trigger painful follow-ups; precision matters too.