Why you never train on all your data
Before training even begins, standard practice is to split your labeled data into at least two sets: a training set the model actually learns from, and a test set the model never sees during training. This split usually happens once, upfront, often around 80% training and 20% test. The reason is straightforward: if you let the model learn from an example, then later ask it to predict that same example, doing well proves nothing, it may have simply memorized the answer rather than learned the underlying pattern.
The test set exists to simulate the real world: new, unseen inputs the model has to handle using only what it generalized from training. A model's score on its training data tells you how well it fit what it already saw. Its score on the test data tells you how well it will likely perform on the next real input, which is almost always the number that actually matters.
