Visualizing PerformanceSummary
One page to revise from — the ideas first, then every formula you need.
- A threshold is a choice; the ROC curve shows a classifier at every threshold at once, as points (FPR, TPR).
- The true positive rate is the share of real positives caught (recall). The false positive rate is the share of real negatives given a false alarm (1 − specificity).
- Every ROC curve runs from (0, 0), where nobody is positive, to (1, 1), where everybody is. Lowering the threshold moves the point up for each positive caught and right for each false alarm.
- A coin flip gives the diagonal; a perfect classifier goes through the top-left corner. The more a curve bulges towards that corner, the better.
- The AUC is the area under the ROC curve: 1 is perfect, 0.5 is a coin flip, below 0.5 is worse than a coin flip.
- The AUC is also the chance that a random positive scores higher than a random negative, so it can be found by counting pairs.
- The AUC only judges the order of the scores and treats both mistakes alike. With rare positives, check precision too.
True positive rate
False positive rate
AUC, two ways