Exam Room · AI Practitioner

Pop Quiz: Ninety-Nine Percent and Blind

· 3 min read

Exam-style

A payments team ships a fraud classifier and reports 99.2% accuracy on a held-out set. In that set, 0.8% of transactions are fraudulent. Six weeks later the fraud investigators say almost nothing is reaching their queue, and the frauds they find themselves were never flagged. The model is doing what it was trained to do and the accuracy figure has not moved. What is that number hiding, and what belongs on the report instead?

Reveal the answer

C. A model that answered 'not fraud' on every transaction would score 99.2% by base rate alone, so report recall and precision together, with the F1 score as the balance figure

Work out what a model that has learned nothing would score. Answer ‘not fraud’ every time and 99.2% of the answers are right, because 99.2% of the transactions are not fraud. The shipped model scores the same, so the headline says only that it has matched the base rate, and it can say that while catching zero frauds. Every prediction lands in one of four cells: a real fraud that was flagged, a real fraud that was missed, a clean transaction that was flagged, and a clean transaction that was left alone. Accuracy adds the two correct cells and divides by everything. The huge pile of correctly ignored clean transactions then swamps the handful of cases anybody cares about. Recall is the share of real frauds that were flagged. It is the number the investigators are complaining about, and a model catching none of them has a recall of zero while accuracy sits at 99.2%. Precision is the share of flags that turned out to be real fraud, and it is what the investigators feel as wasted queue time. The F1 score is the harmonic mean of the two, one figure that stays low unless both are decent. Retraining on fresh data does not help. The imbalance is a property of fraud rather than of the sample, so a new dataset has the same shape. Raising the threshold moves in the wrong direction: fewer flags means higher precision and lower recall, which is the trade already hurting here. ROC AUC is a real metric and a poor sole answer. It is computed across all thresholds and reads optimistically when negatives dominate, so it can look healthy while the threshold running in production catches nothing. More epochs train the model harder towards the same objective that produced the behaviour.

AI Fundamentals · part of The Exam Room

Q. A fraud classifier scores 99.2% accuracy on a set where 0.8% of transactions are fraudulent, and the investigators say nothing is reaching them. What is the number hiding, and what goes on the report?

A. Answering “not fraud” every time also scores 99.2%, so the headline says only that the model matched the base rate. Report recall (the share of real frauds caught) and precision (the share of flags that were real), with the F1 score as the balance figure. Print the class balance beside any accuracy figure that survives.

Why? Sort the predictions into four groups: frauds caught, frauds missed, clean transactions wrongly flagged, clean transactions correctly ignored. Accuracy adds the last two groups and divides by all four. When the last group is 99.2% of the data, it drowns out everything else. Recall counts the misses, which here are money out the door and a customer whose account was drained. Precision counts the false alarms, which are investigator hours and a frozen card belonging to somebody buying groceries. The two pull against each other. Moving the threshold trades one for the other, and neither setting is more correct in modelling terms. Somebody has to price a missed fraud against a wrongly blocked payment, and that is a decision for the business rather than the model; choosing a metric from the cost of being wrong works that method through in full. Keep the second half of the report honest too. A retrained model can lift the F1 score and lift the cost per inference at the same time, which is why model metrics and business metrics belong on the same page.

These posts are LLM-aided. Backbone, original writing, and structure by Craig. Research and editing by Craig + LLM. Proof-reading by Craig.