Skip to main content
. 2020 Sep 10;8:e9920. doi: 10.7717/peerj.9920

Table 7. Formulae for performance metrics.

Metric Formula
Average accuracy i=1lTPi+TNiTPi+FNi+FPi+TNil
Matthew correlation coefficient (TPTN+FPFN)Sqrt((TP+FP)(TP+FN)(TN+FP)(TN+FN))
PrecisionM i=1lTPi(TPi+FPi)l
RecallM i=1lTPi(TPi+FNi)l
F1 scoreM 2PrecisionMRecallMPrecisionM+RecallM

Note:

l denotes class levels, M denotes macro-averaging metrics, TP means true positive, FP denotes false positive, FN means false negative, and TN denotes true negative.