Learn AI · Level 2 · How AI works · step 5 of 16 · word 3 of 5
What is a train-test split in machine learning?
A train-test split means keeping some data aside that the model never sees while learning, then using it to check how well the model does on new cases.
In plain English
It’s like a teacher keeping the exam questions secret. The model learns from the training set. A separate test set, often around a fifth of the data, is locked away and used only at the end. Many teams also keep a third validation set for tuning along the way.
An example
A bank has five years of card payments. It trains its fraud model on the first four years and tests it on the fifth. That copies real life: the model has to judge payments from a period it never saw.
Watch out
If test data leaks into training, scores look great and mean little. This is how overfitting hides, and why AI benchmarks can be gamed. See the full process in how a machine learning model is built.