← All articles
Model evaluation

Evaluating rare classes: precision, recall, and review capacity

Evaluate imbalanced classifiers with confusion counts, per-class metrics, threshold tradeoffs, and a worked example that includes reviewer workload.

5 min read

Start with the cost of the specific mistake

A classifier can look accurate while missing the category the application exists to detect. Before selecting a metric, describe what happens after each prediction. Does a positive prediction send a case to review, interrupt a workflow, or produce a suggestion? What happens when a true positive is missed? Separate the consequences by class rather than assuming every error has the same cost. Record the expected input mix and the number of cases the review team can handle. The evaluation should support a concrete operating decision, including when the system should abstain or defer to a person.

Count the outcomes before calculating a score

For the target class, count true positives, false positives, false negatives, and true negatives. Precision is the fraction of positive predictions that are correct. Recall is the fraction of actual positives that are found. Report the counts alongside the ratios, including how undefined values are handled when there are no positive predictions or no positive examples. An aggregate F1 score can help compare candidates, but it does not show review workload or the distribution of mistakes. Keep the confusion counts available so a reviewer can reconstruct the calculation and judge whether the result addresses the operational objective.

Worked example: high accuracy with a large review queue

Consider a synthetic batch of 10,000 cases with 100 genuine escalation cases. A model finds 80 of those cases, misses 20, and incorrectly flags 400 ordinary cases. It therefore sends 480 cases to review. Precision is 80 divided by 480, approximately 16.7 percent, while recall is 80 percent. Overall accuracy is 95.8 percent because 9,580 cases are classified correctly. That accuracy figure alone hides the fact that most flagged cases are false alarms. Whether the model is useful depends on the cost of the 20 misses and whether the team can review 480 cases in the relevant period.

Choose thresholds using a development set

If the system exposes a usable score, compare operating points on a development set and record the resulting precision, recall, and queue size. Select a threshold against the application requirements rather than picking the highest headline score after looking at the final test. Model scores are not automatically calibrated probabilities, so do not interpret a score of 0.9 as a guaranteed nine-in-ten success rate. After choosing the operating point, evaluate it on the protected test set without tuning again. If production prevalence differs from the development sample, reassess expected workload using evidence from the actual input stream.

Keep rare-class coverage and natural prevalence distinct

A challenge set enriched with difficult positives can reveal important failure modes, but it should not silently replace an evaluation that reflects the production mix. Label the purpose and sampling method of each set. Use a representative set to estimate routine workload, and a targeted set to inspect rare conditions or consequential errors. Report results separately. If you adjust an estimate to account for sampling, document the weights and assumptions. A precision value measured in a heavily enriched sample is not directly the precision the review team should expect from an unfiltered production queue.

Look for leakage and correlated examples

Keep related records together where their relationship could make the test artificially easy. Examples include messages from one conversation, frames from one recording, and repeated reports about the same underlying event. Document how duplicate and near-duplicate cases are handled before sampling. A rare positive repeated in several slightly different forms can make a small test appear much stronger than it is. Choose grouping and time boundaries that match the intended deployment question. Record the number of independent groups as well as the number of rows when that distinction changes how the evidence should be interpreted.

Report uncertainty and empty slices honestly

If a subgroup contains only a few positives, a small number of mistakes can cause a large change in recall. Publish the denominator and an appropriate uncertainty estimate where the decision calls for one. A slice with no positive examples provides no direct evidence about the ability to detect that class. Mark it as unmeasured and plan collection rather than reporting an apparently perfect score. For correlated records, an uncertainty calculation that assumes every row is independent may be misleading. Use a documented evaluation method appropriate to the sampling unit and have the methodology reviewed when the decision is consequential.

Audit labels around disagreements and operational failures

Review missed positives, false alarms, and a random sample of accepted negatives. The random sample helps identify label errors that are invisible when inspection focuses only on the model disagreements. Keep reviewers independent of the prediction where practical, and record whether a correction reflects missing context, a guideline problem, or an annotation mistake. Version the evaluation set when labels change. Recalculate the approved baseline against the corrected version so an apparent model improvement is not actually the result of quietly making the test easier.

Create a release and monitoring decision

Write down the threshold, test version, confusion counts, queue estimate, and the conditions that require escalation or rollback. Compare the proposed model with the approved baseline on the same cases. Assign an owner to review changes in source mix and the capacity of the human review team. A model that meets recall requirements but produces an unmanageable queue needs an operating change before release. After deployment, gather reviewed outcomes and compare them with the pre-release estimate. Keep the result connected to the specific action the classifier supports, rather than treating a good offline score as a permanent approval.