Train, validation, test - and why it matters
Use training for fitting, validation for choices, and test once for reporting. Split by physical object when related images could leak information.
fit parameters
choose thresholds and settings
report once
Training loss can keep improving while validation loss turns upward. Report the held-out test result after model choices are finished.
Confusion matrices and F1
Precision, recall, and F1 all come from the same four counts. Choose the metric that matches the scientific cost of mistakes.
Drag the threshold. Coral dots are mistakes: positives that fall below it (FN) and negatives that clear it (FP). Every metric on the right is just a different way of counting them.
predicted +, actually +
predicted +, actually -
predicted -, actually +
predicted -, actually -
Multi-label metrics: micro-F1 and macro-F1
Micro-F1 pools all decisions. Macro-F1 makes rare labels visible.
The two common labels stay fixed. Only the rare label degrades, and the two averages tell very different stories about it.
Pools all decisions first. Frequent labels dominate, so it barely notices the rare label failing.
Averages per-label scores. The rare label carries a full third of the weight, so its failure is visible.
Non-classification metrics
Use the lightest evaluator that can catch the failure: schema checks, runnable tests, reference answers, grounding checks, or judges.
Use schema checks and parsers.
Run unit tests, examples, and integration tests.
Compare against reference outputs.
Check grounding, retrieval, and source coverage.
Use rubrics, human review, or LLM judges as a last layer.