An inspection system labels almost every part correctly, yet misses every defective part in a small evaluation set. That outcome is mathematically possible when defects are rare. A percentage called accuracy needs the underlying counts before it can explain whether the robot's inspection function is useful.
Precision and recall answer more specific questions about positive classifications. They do not replace a definition of defect, a representative evaluation, or an understanding of what happens after a part is flagged. Their value comes from making the denominators visible.
Define positive before calculating anything
For this original hypothetical example, positive means the inspection model flags a part as defective. Negative means it does not flag that part. Assume every part has a trusted reference label and receives exactly one final binary decision.
A true positive is an actually defective part that is flagged. A false negative is a defective part that is not flagged. A false positive is a sound part that is flagged, and a true negative is a sound part that is not flagged.
These definitions describe agreement with the reference labels. They do not establish that the labels are correct or that the model identified the physical cause of a defect.
One thousand parts, ten defects
Imagine an evaluation containing 1,000 distinct parts: 10 defective and 990 sound. The model flags eight of the defective parts and twenty of the sound parts.
The four counts are therefore eight true positives, two false negatives, twenty false positives, and 970 true negatives. They sum to 1,000. The predicted-positive group contains 28 parts, while the actual-positive group contains ten.
Recall is the fraction of actual positives found: 8/(8 + 2) = 80%. Precision is the fraction of positive predictions that are correct: 8/(8 + 20), approximately 28.6%.
Accuracy is the fraction of all decisions that match their reference labels: (8 + 970)/1,000 = 97.8%. All three numbers describe the same invented outcomes. Their differences come from the questions and populations being counted.
This is arithmetic for a fictional evaluation, not a deployment result, acceptance target, or recommendation for any inspection process.
A higher accuracy can describe a useless detector
Now consider a hypothetical alternative that labels every one of these parts sound. It has 990 true negatives, ten false negatives, and no positive predictions.
Its accuracy is 99%, higher than the first model's 97.8%. Its recall is zero because it finds none of the ten defects. Calling the alternative better solely because its accuracy is higher would hide the purpose of the defect-detection task.
Its precision denominator is zero because it never predicts positive. That is an undefined ratio, not evidence that its positive predictions are perfect. Software may report a chosen fallback value, so that convention must accompany the result.
Google's classification reference explains these metric definitions and the effect of class imbalance. The scikit-learn precision reference separately documents configurable zero-division behavior. The counts here are independent editorial examples rather than reproduced exercises.
A flagged-part workload is another number
In the first example, the model flags 28 parts. Twenty of those flags concern sound parts. If every flag leads to a review, the review count is 28 under that explicitly assumed workflow.
That workload is not the same as the false-positive rate. The false-positive rate divides twenty by the 990 actual sound parts, approximately 2.02%. Precision instead divides eight by all 28 flags. Confusing the two percentages gives an incorrect account of either review quality or sound-part handling.
Neither percentage supplies review duration, rework cost, or production throughput. Those outcomes require additional observations. A model metric can identify a branch of a workflow without measuring the complete workflow that follows it.
Prevalence changes the meaning of a flag
A further hypothetical population makes this visible. Suppose there are 100 defective and 990 sound parts. Imagine the system finds 80 defects and incorrectly flags twenty sound parts.
Recall remains 80%. The false-positive rate remains 20/990, approximately 2.02%. Precision is now 80/(80 + 20) = 80%, rather than about 28.6%.
These are constructed counts, not a promise that a model preserves its behavior across populations. They show that even matching recall and false-positive rate do not fix precision when the proportion of actual defects changes.
An evaluation deliberately enriched with defective examples can therefore answer a different question from a naturally occurring production stream. The sampling method belongs beside the metric, rather than being hidden behind a favorable percentage.
The unit of evaluation also matters
A robot may capture many images of one part. Counting every image as a separate decision is different from counting one final decision per part. Eight correct frames from one defective part are not evidence of eight distinct defective parts found.
Likewise, a system that flags one region, one image, or one assembled product has different denominators. A report needs to name that unit and explain how multiple observations become a final decision.
Changing a classification threshold can change the count of positive predictions, missed defects, and false alarms. The comparison should retain the threshold and evaluation population. A single selected operating point does not describe every possible behavior of the model.
Keep the evidence behind the percentage
The original 1,000-part example supports a precise account: eight defects found, two missed, twenty sound parts flagged, and 970 sound parts left unflagged. Precision, recall, and accuracy summarize different parts of that account.
Those numbers still leave questions about reference labels, population coverage, and downstream decisions. Keeping the counts and evaluation unit visible makes the limitations understandable and prevents a high accuracy figure from concealing the defect-detection behavior the robot application actually needs to assess.
Image note: The accompanying site-library robot perception scene is a concept illustration. It is not a measured inspection trial, a labeled evaluation dataset, or evidence of the hypothetical detection rates.
Sources checked October 23, 2026:
Google, Classification: Accuracy, recall, precision, and related metrics:
https://developers.google.com/machine-learning/crash-course/classification/accuracy-precision-recall?hl=en
scikit-learn, precision_score, stable documentation as accessed:
https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_score.html
All inspection populations, counts, calculations, and workflow interpretation: original ZHILIANHAI editorial analysis.