Validation rows can choose a threshold before the held-out test rows are measured. This lesson freezes one exact threshold and then counts the test grid once.

highlighted = computed this step

State the validation rule

The validation rows try thresholds 5, 3, and 1. The rule is pinned before the test rows are read: choose the highest threshold whose validation recall is at least 2/3.

choose highest t with Rval2/3\text{choose highest }t\text{ with }R_{\text{val}}\ge 2/3
Validation chooses the thresholdExact validation choice and frozen test measurement.validation chooses thresholdthresholdprecisionrecallrule check511/3skip32/32/3choose13/51skipchoose the highest threshold with validation recall at least 2/3; chosen threshold=3frozen threshold on held-out test rowsrowactualscoreoutputcellt1positive4positiveTPt2positive2negativeFNt3negative5positiveFPt4negative1negativeTNthreshold frozen at 3test confusion grid, measured onceoutputpositivenegativeactualpositivenegativeTP1FN1FP1TN1accuracy=1/2precision=1/2, recall=1/2validation chooses; test measures once; retuning after seeing test rows breaks the clean test result; does not prove future performance; NOT training;NOT generalizationthreshold fixed first; metric alone is not a claim; NOT training

Choose from validation only

Threshold 5 has recall 1/3, so it misses the rule. Threshold 3 has recall 2/3 and is the highest threshold that passes. Threshold 1 also passes, but it is lower.

t=3chosen on validation rowst=3\quad \text{chosen on validation rows}
Validation chooses the thresholdExact validation choice and frozen test measurement.validation chooses thresholdthresholdprecisionrecallrule check511/3skip32/32/3choose13/51skipchoose the highest threshold with validation recall at least 2/3; chosen threshold=3frozen threshold on held-out test rowsrowactualscoreoutputcellt1positive4positiveTPt2positive2negativeFNt3negative5positiveFPt4negative1negativeTNthreshold frozen at 3test confusion grid, measured onceoutputpositivenegativeactualpositivenegativeTP1FN1FP1TN1accuracy=1/2precision=1/2, recall=1/2validation chooses; test measures once; retuning after seeing test rows breaks the clean test result; does not prove future performance; NOT training;NOT generalizationthreshold fixed first; metric alone is not a claim; NOT training

Freeze and count test rows

Now freeze threshold 3 and count the held-out test rows once. The four cells are TP=1, FN=1, FP=1, and TN=1.

TP=1,  FN=1,  FP=1,  TN=1TP=1,\;FN=1,\;FP=1,\;TN=1
Validation chooses the thresholdExact validation choice and frozen test measurement.validation chooses thresholdthresholdprecisionrecallrule check511/3skip32/32/3choose13/51skipchoose the highest threshold with validation recall at least 2/3; chosen threshold=3frozen threshold on held-out test rowsrowactualscoreoutputcellt1positive4positiveTPt2positive2negativeFNt3negative5positiveFPt4negative1negativeTNthreshold frozen at 3test confusion grid, measured onceoutputpositivenegativeactualpositivenegativeTP1FN1FP1TN1accuracy=1/2precision=1/2, recall=1/2validation chooses; test measures once; retuning after seeing test rows breaks the clean test result; does not prove future performance; NOT training;NOT generalizationthreshold fixed first; metric alone is not a claim; NOT training

Boundary

On those held-out rows, accuracy, precision, and recall are all 1/2. Validation chooses; test measures once. Retuning after seeing test rows would no longer be a clean test result, and this does not prove future performance or training behavior.

accuracy=precision=recall=1/2\operatorname{accuracy}=\operatorname{precision}=\operatorname{recall}=1/2
Validation chooses the thresholdExact validation choice and frozen test measurement.validation chooses thresholdthresholdprecisionrecallrule check511/3skip32/32/3choose13/51skipchoose the highest threshold with validation recall at least 2/3; chosen threshold=3frozen threshold on held-out test rowsrowactualscoreoutputcellt1positive4positiveTPt2positive2negativeFNt3negative5positiveFPt4negative1negativeTNthreshold frozen at 3test confusion grid, measured onceoutputpositivenegativeactualpositivenegativeTP1FN1FP1TN1accuracy=1/2precision=1/2, recall=1/2validation chooses; test measures once; retuning after seeing test rows breaks the clean test result; does not prove future performance; NOT training;NOT generalizationthreshold fixed first; metric alone is not a claim; NOT training