Precision, recall and the threshold

Two modes in one widget. Edit TP, FP, FN and TN directly and every metric updates; or take a fixed labelled dataset and drag the decision threshold while a live dot walks the precision–recall and ROC curves.

Try this

Make the negative class 100× larger than the positive one and watch accuracy stay high while precision falls apart.

Where this lab comes from

Classification Metrics, From the Ground Up: Precision, Recall, F1, ROC and AUC

The confusion matrix and everything that falls out of it: precision, recall, F1, specificity, the precision/recall trade-off, PR and ROC curves, and AUC, all built on one running toy example (a backyard cat-cam), with the equations, the intuition, and scikit-learn.

More in metrics