Topic summary
Confusion matrix
A confusion matrix, also known as error matrix, is a specific table layout that allows visualization of the performance of a person or an algorithm on a specific task. In audiology these matrices measure how a person can hear specific words or sounds. In machine learning these matrices show the success of the learning system both in supervised learning and unsupervised learning, where they are usually called 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. The diagonal of the matrix therefore represents all instances that are correctly predicted. The name stems from the fact that it makes it easy to identify whether the system is confusing two classes (i.e., commonly mislabeling one class as another). The confusion matrix has its origins in human perceptual studies of auditory stimuli. It was adapted for machine learning studies and used by Frank Rosenblatt, among other early researchers, to compare human and machine classifications of visual (and later auditory) stimuli.
It is a special kind of contingency table, with two dimensions ("actual" and "predicted"), and identical sets of "classes" in both dimensions (each combination of dimension and class is a variable in the contingency table).