The AUROC is one of the most commonly used metric to evaluate a classifier's performances. This section explains how to compute it.
AUC (Area Under the Curve) is used most of the time to mean AUROC, which is a bad practice as AUC is ambiguous (could be any curve) while AUROC is not.
Abbreviation | Meaning |
---|---|
AUROC | Area Under the Curve of the Receiver Operating Characteristic |
AUC | Area Under the Curce |
ROC | Receiver Operating Characteristic |
TP | True Positives |
TN | True Negatives |
FP | False Positives |
FN | False Negatives |
TPR | True Positive Rate |
FPR | False Positive Rate |
The AUROC has several equivalent interpretations:
Assume we have a probabilistic, binary classifier such as logistic regression.
Before presenting the ROC curve (= Receiver Operating Characteristic curve), the concept of confusion matrix must be understood. When we make a binary prediction, there can be 4 types of outcomes:
To get the confusion matrix, we go over all the predictions made by the model, and count how many times each of those 4 types of outcomes occur:
In this example of a confusion matrix, among the 50 data points that are classified, 45 are correctly classified and the 5 are misclassified.
Since to compare two different models it is often more convenient to have a single metric rather than several ones, we compute two metrics from the confusion matrix, which we will later combine into one:
To combine the FPR and the TPR into one single metric, we first compute the two former metrics with many different threshold (for example ) for the logistic regression, then plot them on a single graph, with the FPR values on the abscissa and the TPR values on the ordinate. The resulting curve is called ROC curve, and the metric we consider is the AUC of this curve, which we call AUROC.
The following figure shows the AUROC graphically:
In this figure, the blue area corresponds to the Area Under the curve of the Receiver Operating Characteristic (AUROC). The dashed line in the diagonal we present the ROC curve of a random predictor: it has an AUROC of 0.5. The random predictor is commonly used as a baseline to see whether the model is useful.