Training, validation, and test data serve different roles in a modeling procedure. Their separation helps the final evaluation reflect performance on data that did not guide model selection.
Worked example
Use training data to fit parameters and validation data to choose settings such as regularization strength. After those choices are fixed, evaluate on the test partition. If you repeatedly inspect test results and change the model in response, the test data begin to influence selection and the reported result loses that independence.
What to check
The split must respect the data-generating process. Related records from one person or one document may need to stay together. Forecasting requires a time-aware split so that later information cannot influence an earlier prediction. Fit preprocessing steps using the training partition as well. Document the grouping, time boundaries, and selection procedure so that another reader can understand what the final score estimates.
Continue with the book
Explore the full treatment, worked examples, and exercises in Mathematics for AI and Machine Learning.
Companion article for Mathematics for AI and Machine Learning, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
