Machine Learning Foundations
Train, Validation, and Test Splits · 1/2

Why you can't grade your own homework with the answer key you memorized

If you evaluate a model's performance using the same data it was trained on, you're not measuring how well it learned, you're measuring how well it memorized, and those are very different things. This is why ML practitioners split their data into separate chunks before training even begins: a training set the model learns from, a validation set used to tune choices like model architecture and hyperparameters, and a test set that's touched only once, at the very end, to get an honest estimate of real-world performance.

A common split is roughly 70% training, 15% validation, 15% test, though the exact ratios vary by how much data you have. The critical rule is that the test set must stay completely untouched during development, no peeking, no tuning based on it, because the moment you start adjusting your model based on test set results, it stops being an honest measure of unseen performance and starts becoming another form of training data.