AlterTrace
EN
← Blog / knowledge

TESTING WORKSHOP

Precision and recall: start with the four counts

Precision asks how many positive predictions were correct. Recall asks how many actual positive examples were found. Neither percentage is the probability that an individual insurance claim is fraudulent.

01

Define the positive class first

Write what positive means in this test: fully generated images, locally edited images or another specified category. A label of fraud is not a file-origin class. Record how reference labels were established, which files were evaluated and the fixed threshold.

Make a four-cell count: TP means reference positive and predicted positive; FP means reference negative but predicted positive; FN means reference positive but predicted negative; TN means both negative. Unknown reference labels and unavailable responses need separate accounting.

02

Calculate two different fractions[1][2]

Precision = TP / (TP + FP). Recall = TP / (TP + FN). The scikit-learn documentation gives these definitions and exposes handling of zero denominators. Report the counts beside the fractions and state the positive class.

Hypothetical arithmetic only: with TP=8, FP=2, FN=4 and TN=6, precision is 8/10=80% and recall is 8/12, about 66.7%. This is an invented teaching example, not a benchmark or an AlterTrace performance claim.

03

Check the denominator before comparing reports

If there are no positive predictions, precision has a zero denominator. If the set contains no reference positives, recall does too. Mark the metric undefined and disclose any software convention rather than presenting a substituted zero or one as measured success.

Ask whether percentages describe all submitted files or only completed classifications. List missing, rejected and inconclusive cases and explain their treatment. Compare systems on compatible samples, label definitions and operating points. Changing the threshold changes the classification counts.

04

Do not turn dataset statistics into a case verdict

The proportion and kinds of positive examples in a test matter to interpretation. A curated test set does not establish the frequency of altered photos in incoming claims. Two percentages also omit uncertainty from a small or unrepresentative sample.

Use the count table to discuss errors and further testing with the team. Analysis supports file review; it is not a valuation, proof of fraud or an automatic basis for compensation. A positive image classification does not establish who edited it or why.

Sources and references

Sources

  1. 01scikit-learn - precision_score↗
  2. 02scikit-learn - recall_score↗
Frequently asked questions

Frequently asked questions

01Is precision the same as accuracy?+

No. Precision uses predicted positives as its denominator. Accuracy counts all correct classifications among the classified examples.

02Can I omit files without a response?+

Not silently. Report their number and the metric population; a completed-only result does not describe service coverage.

Check your own image

Have an actual file rather than a theoretical problem? Run a multi-layer authenticity analysis.

Check your own image ↗
AlterTracer 2026