Table 2 Formulas for the statistical features extracted from the confusion matrix, where \(n_{TP}\), \(n_{FP}\), \(n_{TN}\) and \(n_{FN}\) represent the number of true positives, false positives, true negatives and false negatives, respectively.

From: Deep learning for the quality control of thermoforming food packages

Measure

Formula

Accuracy (A)

\(\dfrac{n_{TP} + n_{TN}}{n_{TP} + n_{TN} + n_{FP} + n_{FN}}\)

Precision (P)

\(\dfrac{n_{TP}}{n_{TP} + n_{FP}}\)

Recall (R)

\(\dfrac{n_{TP}}{n_{TP} + n_{FN}}\)

F-score (F)

\(2 \times \dfrac{Precision \times Recall}{Precision + Recall}\)

False omission rate (FOR)

\(\dfrac{n_{FN}}{n_{FN} + n_{TN}}\)

False discovery rate (FDR)

\(\dfrac{n_{FP}}{n_{FP} + n_{TP}}\)