Skip to main content

πŸ“ ROC–AUC

Description​

  • The ROC curve (Receiver Operating Characteristic) plots a binary classifier's true-positive rate against its false-positive rate at every possible decision threshold.

    TPR=TPTP+FN,FPR=FPFP+TN\mathrm{TPR}=\frac{TP}{TP+FN},\qquad \mathrm{FPR}=\frac{FP}{FP+TN}
  • AUC is the area under that curve. It measures ranking quality: the probability that a randomly chosen positive example receives a higher score than a randomly chosen negative example. The larger the AUC, the better the classifier is.

Key points​

AUCInterpretation
1.0Perfect ranking
0.5No better than random ranking
< 0.5Rankings are reversed; swapping score direction gives an AUC above 0.5
  • ROC–AUC is threshold-independent, so use it to compare a model's overall ability to rank positive cases above negative ones. Choose the final operating threshold separately from business costs, capacity, and error tradeoffs.
  • On heavily imbalanced datasets, ROC–AUC can look strong even when precision is poor; precision–recall AUC is often more informative when the positive class is rare.
  • ROC–AUC measures ranking, not probability quality. A model can have a high AUC and poor confidence calibration; see Confidence Calibration.
  • For multiclass tasks, specify the averaging schemeβ€”commonly one-vs-rest with macro, weighted, or micro averaging.

Crash course​

Reference​