Confusion matrix

Confusion matrix is used to measure classification metrics:

  • True Positives(TP): Number of samples that are correctly classified as positive, and their actual label is positive.
  • False Positives (FP): Number of samples that are incorrectly classified as positive, when in fact their actual label is negative.
  • True Negatives (TN): Number of samples that are correctly classified as negative, and their actual label is negative.
  • False Negatives (FN): Number of samples that are incorrectly classified as negative, when in fact their actual label is positive.

confusion-matrix.jpg


Notes:

  • Most of the performance metrics for Classification models are based on the values of the confusion matrix.