Receiver operating characteristic – ROC analysis
Along the same lines of examining NPV, there are standard measures that examine cells within a confusion matrix.
Getting ready
Sensitivity
Sensitivity, like NPV in the previous section, is a mathematical function of the confusion matrix cells. Sensitivity is the proportion of people who took the test with a condition and were correctly labeled as having the condition, diabetes in this case:

Mathematically, it is the ratio of patients correctly labeled as having a condition (TP) divided by the total number of people who actually have the condition (TP + FN). First, recall the confusion matrix cells. Focus on the Truth row, which corresponds to all people who have diabetes:

Consequently:

Another name for sensitivity is true positive rate (TPR).
A visual perspective
Another perspective on the confusion matrix is very visual. Let us visualize both the positive class having diabetes and the negative class having no diabetes with histograms (on the left...