A confusion matrix displays the number of correct or incorrect predictions made by a classifier such as a Bayesian network.

Diagonal elements of the matrix show the number of correct predictions, while off-diagonal elements show incorrect predictions.

An example is shown below.

Confusion Matrix
Note

When classifiers predict an output which is true or false, we get the following terms:

  • False positive when a prediction incorrectly yields True, when the actual outcome was False (Type I error)

  • False negative when a prediction incorrectly yields False, when the actual outcome was True (Type II error)

  • True positive when a prediction correctly yields True, when the actual outcome was also True

  • True negative when a prediction correctly yields False, when the actual outcome was False