ROC Curve (Receiver Operating Characteristic)

For a binary classifier that outputs a score/probability, the ROC curve plots true positive rate (recall) vs false positive rate as the classification threshold varies from 0 to 1.

  • TPR = TP / (TP + FN) — fraction of positives correctly identified
  • FPR = FP / (FP + TN) — fraction of negatives incorrectly flagged

A random classifier lies on the diagonal (TPR = FPR).
Better classifiers bow toward the top-left corner (high TPR, low FPR).
The area under this curve is the AUROC.

![[ROC curve-1764061952603.webp]]

Interactive demo: