Keep evaluation separate from training
An evaluation set checks behavior on examples not used to fit the model.
- Choose a simple baseline.
- Keep the evaluation examples out of fitting and tuning.
- Report the metric, sample limitations and failure cases together.
A model that memorises training labels can perform poorly on unseen examples.
See the reasoning, step by step.
- Fictional dataset: choose training and test partitions before learning a scaling transformation.
- Fit the scaler only on training rows. Apply that fitted scaler to both partitions; fit the model using training data.
- Evaluate the held-out partition only after choices are fixed. Fitting preprocessing on all rows lets test information influence training.
A mistake worth catching
The trap: Normalising the entire dataset before splitting it.
A better approach: Learn preprocessing within the training workflow, using a pipeline and appropriate validation where relevant.
Your turn: use the idea.
A student chooses hyperparameters by repeatedly checking the final test score. What should change?
Try it yourself first. This is a self-review task, not automatic marking.
Compare with a model answer
Use a separate validation procedure for model choices. Reserve the final test set for an evaluation after those choices are fixed; disclose any prior reuse.
Check your own work
Go deeper with the right source.
Supporting references and further reading. The worked examples above are original CampusSpark teaching material.
Official guidance on preprocessing, fitting and evaluation separation.