difficulty 3/5
ROC AUC
The area under the curve traced by a classifier's true and false positive rates as the decision threshold sweeps — one number summarising performance at every threshold at once.
Intuition
Every metric built on the confusion matrix describes a classifier at one threshold. Move the cutoff and all of them change. That makes threshold choice a confound: comparing two models measured at different cutoffs compares the cutoffs as much as the models.
The ROC curve removes the confound by refusing to choose. It sweeps the threshold across its whole range and plots what happens — true positive rate against false positive rate — tracing a curve. The area under that curve compresses the whole sweep into one number.
Formal definition
How it works
Where it's used
Why & when
Worked example
Pitfalls
Check yourself
3 questions
The questions on this page come with access. They are graded on the server, so the answers stay there until you have given yours.
On the cheat sheet: Classification metrics →
Sources
- scikit-learn — sklearn.metrics.roc_auc_scoredocs · retrieved 2026-08-30https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_auc_score.html
- Machine Learning Crash Course — ROC and AUCcourse · retrieved 2026-10-04https://developers.google.com/machine-learning/crash-course/classification/roc-and-auc
- Machine Learning Crash Course — Classification: accuracy, recall, precision, and related metricscourse · retrieved 2026-10-06https://developers.google.com/machine-learning/crash-course/classification/accuracy-precision-recall
- Introduction to Information Retrieval (2008)bookhttps://nlp.stanford.edu/IR-book/html/htmledition/irbook.html