Classification metrics from counts

Problem

A classifier has TP=30\mathrm{TP}=30, FP=10\mathrm{FP}=10, FN=20\mathrm{FN}=20, and TN=40\mathrm{TN}=40. Compute accuracy, precision, recall, and F1F_1.

Reveal answer or reference solution

Accuracy is 0.700.70, precision is 0.750.75, recall is 0.600.60, and

F1=2(0.75)(0.60)0.75+0.60=23.F_1=\frac{2(0.75)(0.60)}{0.75+0.60}=\frac{2}{3}.

Local history

Loading attempts saved in this browser…

    Appears in