Skip to main content
. 2016 Sep 22;16(10):1563. doi: 10.3390/s16101563

Table 3.

Template of a confusion matrix for a 3-class classifier.

Definition Formula
True Positive (TP) The number of samples of a class which have been correctly classified TPi=nii
True Negative (TN) The number of samples of other classes which has been correctly classified TNi=jikinjk
False Positive (FP) The number of samples not belongs to a class which has been incorrectly classified as belonging to it FPi=kinki
False Negative (FN) The number of samples belonging to a class which have been incorrectly classified as belong to other class FNi=kinik
Accuracy The proportion of all samples which have been correctly classified Acc=iniiTPi+TNi+FPi+FNi
Sensitivity The proportion of samples which have been correctly classified Sensi=TPiTPi+FPi
Precision The proportion of sample predicted to belong to a class which is correct Preci=TPiTPi+FPi
Specificity The proportion of negative samples which have been correctly classified to be negative Speci=TNiFPi+TNi
F-Measure the weighted average of the precision and sensitivity F1=21/Sensi+1/Preci