Open Agent School · Public worked example
Train, Validation & Test: meaning and example
Welcome! Take one idea with you today.
The training set supplies examples for parameter fitting. The validation set helps choose model settings and development decisions without fitting the base model on those examples. The test set is reserved for a final evaluation of the chosen procedure. These are roles, not three magic percentages.
Picture it: A fictional repair shop has 1,000 synthetic visits, with repeat visits by the same customer. You want performance on new customers next month. Randomly splitting rows can place almost identical visits on both sides. Plan customer-separated development data and a later final evaluation that matches the time boundary.
What is easy to mix up?
Once its results influence selection, it has served a development role. Do not tune on the final test and then report that same score as untouched evidence.
Teaching example by Open Agent School. Source: scikit-learn - Cross-validation: evaluating estimator performance.