Classification Metrics

Maninder Virk
3 min readFeb 15, 2020

--

Classification metrics and confusion matrices go hand in hand. You can’t have one without the other. Well, actually you can…but one is dependent upon the other. Confusion matrices are the result of classification problems. There are four possible values that make up the result: True Positive, False Negative, False Positive, and True Negative.

The chart above is an example of a Confusion Matrix. The four resulting values mentioned earlier are labeled and displayed in the white boxes in the chart. The pink boxes with formulas on the periphery are Classification Metrics. To understand the metrics, one must understand the results.

True Positive — these are cases in which the classification model created correctly predicted positive.

False Negative — these are cases in which the classification model predicted false, but are actually positive. These are also considered Type II errors.

False Positive — these are the cases in which the classification model predicted positive, but are actually negative. These are also considered Type I errors.

True Negative — these are the cases in which the classification model correctly predicted negative.

Once results of the classification problem have been received, classification metrics can be calculated. These metrics include, but are not limited to the following: Sensitivity, Specificity, Accuracy, Negative Predictive Value, and Precision.

Sensitivity — also known as the True Positive Rate or Recall. Outcomes that are correctly predicted as positive. Calculated using the formula below.

Specificity — also known as the True Negative Rate. Outcomes that are correctly predicted as negative. Calculated using the formula below.

Accuracy — Outcomes that are correctly labeled at true. Calculated using the formula below.

Negative Predictive Value — Outcomes that are correctly labeled as false.

Precision — Outcomes that are correctly predicted positive. Calculated using the formula below.

Once the basics of the confusion matrix are figured out, calculating the classification metrics will not only make sense, but they will be easy to assess.

--

--