Is your AI classifier reliable? Precision and recall from a small confusion table
Calculate precision, recall and accuracy on fictional feedback, then compare the costs of missed and false alerts.
Define the positive case
Suppose an AI flags feedback about incidents needing prompt human attention. Define a positive as an incident that human reviewers confirm needs prompt attention. Write labeling criteria first and have authorized reviewers label an independent sample; handle personal information under team rules. The 100 examples below are fictional teaching numbers, not observed model results.
Count the four outcomes
Of 100 items, human labels identify 10 positives and 90 negatives. The AI flags 9: 6 are true positives (TP) and 3 are false positives (FP). Of the 91 unflagged items, 4 are false negatives (FN) and 87 are true negatives (TN). Accuracy is (6+87)/100=93%, but that number alone hides four missed incidents.
Calculate precision and recall separately
Precision asks what fraction of flagged items are real positives: TP/(TP+FP)=6/9, about 66.7%. Recall asks what fraction of actual positives were found: TP/(TP+FN)=6/10=60%. A system labeling every item negative still has 90% accuracy but zero positive recall. If a denominator is zero, do not interpret the ratio as a meaningful score; report the undefined case and the tool’s handling.
Review costs rather than shipping on one number
A missed incident can delay action; false alerts add review work. Agree with the responsible team on acceptable misses and review workload. Keep labels, samples and model settings fixed when comparing individual outcomes. If the system has an adjustable score threshold, compare thresholds on a validation set and evaluate the final choice on a separate test set. Retain edge cases and human review, check whether the sample reflects the real distribution, and do not treat one small sample as a production guarantee.
Reference:scikit-learn: precision and recall metrics
Continue: design a feedback workflow with human review (free) →