Metrics

Discover more about the four most commonly used metrics: true and false positive rates, precision, recall and accuracy.

Most commonly used metrics

Starting with these four numbers, TN, FP, FN, and TP, you may construct a ton of metrics. We are focusing here on the most commonly used: true and false-positive rates (TPR and FPR), precision, recall, and accuracy.

True and false-positive rates

Let us start with the first two:

TPR=TPTP+FNTPR = \dfrac{TP}{TP + FN}   FPR=FPFP+TN\space \space FPR = \dfrac{FP}{FP + TN}

For both of them, you divide one value on the right column (positive) by the sum of the corresponding row. So, the true positive rate is computed by dividing the value on the bottom right by the sum of the bottom row. Similarly, the false positive rate is computed by dividing the value on the top right by the sum of the top row. However, what exactly do these mean?

The true positive rate tells you, from all points you know to be positive, how many your model got right. In our example, we know there are 11 positive examples. Our model got ten right. The TPR is 10 out of 11 or roughly 91%. There is yet another name for this metric: recall. Makes sense, right? From all the positive examples, how many does your model recall?

Get hands-on with 1400+ tech skills courses.