Skip to main content

Table 9 Accuracy, precision, recall and F1 score explanation. TP, TN, FP, and FN are true positive, true negative, false positive, and false negative, respectively

From: Machine learning classification of multiple sclerosis patients based on raw data from an instrumented walkway

Accuracy (%)

The total number of correct predictions out of the total number of all predictions

\(\frac{\text{TN}+\text{TP}}{\text{TN}+\text{TP}+\text{FN}+\text{FP}}*100\text{\%}\)

Precision (%)

Or positive predictive value. represents the proportion of true positive predictions to all actual positives

\(\frac{\text{TP}}{\text{TP}+\text{ FP}}*100\text{\%}\)

Recall (%)

Or sensitivity. measures the proportion of true positives to the total number of actual positives

\(\frac{\text{TP}}{\text{TP}+\text{FN}}*100\text{\%}\)

F1 Score (%)

The weighted harmonic mean of precision and recall

\(2* \frac{\text{Precision}*\text{sensitivity}}{\text{Precision}+\text{sensitivity}}*100\text{\%}\)