Definitions


# What is a Confusion Matrix?

In the field of machine learning and specifically the problem of statistical classification, a confusion matrix, also known as error matrix, is a specific table layout that allows visualization of the performance of an algorithm, typically a supervised learning one; in unsupervised learning it is usually called a matching matrix.

Each row of the matrix represents the instances in an actual class while each column represents the instances in a predicted class, or vice versa – both variants are found in the literature.


# Confusion Matrix:

4 outcomes

True, if the prediction matches the classification False, if the prediction does not match the classification

  1. actual classification is positive - predicted classification is positive (1, 1) = True Positive
  2. actual classification is positive - predicted classification is negative (1, 0) = False Negative
  3. actual classification is negative - predicted classification is positive (0, 1) = False Positive
  4. actual classification is negative - predicted classification is negative (0, 0) = True Negative

Wikipedia Example

Confusion Matrix - Wikipedia

  • We have 12 individuals
  • 8 have been diagnosed with cancer (1) - 4 are cancer-free (0)


  • A classifier distinguishes between individuals with / without cancer


# Example

In a Classificationmodel (picture: man/woman) with a test amount of 100 pictures (60/40) show the following results:

  1. 40 / men - were right
  2. 35 / women - were right