Confusion Matrix

As the name implies, a confusion matrix is a numerical matrix that indicates the confusion points in a model. The confusion matrix is a structured method of mapping the predictions to the original classes to which the data belong. In other words, it is a class-wise distribution of the predictive performance of a classification model. This suggests that confusion matrices are only applicable in supervised learning frameworks—that is, when the output distribution is known.

Confusion Matrix for Binary classification:

A dataset with just two unique categories of data is called a binary class dataset. To keep things simple, we might refer to these two groups as the “positive” and the “negative.”

Assume that the dataset we use to assess a machine learning model has a binary class imbalance, with 60 samples in the test set’s positive class and 40 samples in its negative class.

Now, in order to completely comprehend the confusion matrix pertaining to this binary class categorization issue, we must first obtain familiar with the following terms:

  • True Positive (TP) refers to a sample belonging to the positive class being classified correctly.
  • True Negative (TN) refers to a sample belonging to the negative class being classified correctly.
  • False Positive (FP) refers to a sample belonging to the negative class but being classified wrongly as belonging to the positive class.
  • False Negative (FN) refers to a sample belonging to the positive class but being classified wrongly as belonging to the negative class.

Leave a Reply

Your email address will not be published. Required fields are marked *