Skip to main content
. 2018 Feb 6;19:35. doi: 10.1186/s12859-018-2043-3

Table 3.

Performance measures for the binary classification problem: TP – true positives, TN – true negatives, FP – false positives, FN – false negatives

Measure Mathematical formulation Comment
Accuracy A =TP+TNTP+TN+FP+FN Indicates the fraction of correct predictions over the total: not very significant when dealing with imbalanced data.
Precision P =TPTP+FP Indicates the fraction of relevant instances among the retrieved ones.
Recall R =TPTP+FN Indicates the fraction of relevant instances that have been retrieved over the total relevant instances.
F1 score F1=2×P×RP+R It is the harmonic mean of precision and recall.
Matthews correlation coefficient MCC =TP×TNFP×FN(TP+FP)(TP+FN)(TN+FP)(TN+FN) Returns a value between −1 and +1: +1 represents a perfect prediction, 0 no better than random prediction and −1 indicates total disagreement between prediction and observation.