AI engineering glossary · ML fundamentals
What is train-test contamination?
Train-test contamination (also called Test-set contamination): When information from the test data influences training, whether through preprocessing fitted on all rows, duplicate records across the split or repeated tuning against the test set. It makes reported performance unrealistically high.
Train-test contamination: an example
Computing the mean used for scaling on the whole dataset before splitting lets test statistics shape the training features.
Related terms
More ML fundamentals terms
- Training
- Training error
- Training example
- Training set
- Transfer learning
- True risk
- Underfitting
- Unsupervised learning
Where you learn it
Train-test contamination is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.