1.5 What "training" actually means
What "training" actually means
People say a model is "trained" as if it studied for an exam. Mechanically, training is more humble and more precise than that.
Parameters and error
A model is a mathematical function with a large number of adjustable numbers inside it called parameters (or weights). At the start they are random, so the model's outputs are nonsense. Training is the process of nudging those numbers so the model's outputs get closer to the correct answers in the training data. We measure "how wrong" the model is with a number called the loss (or error). Training is, at heart, a search for the parameter settings that make the loss as small as possible.
The loop
The process is a loop: show the model an example, compare its output to the correct answer, measure the error, adjust the parameters a tiny bit to reduce that error, repeat — millions or billions of times. No human inspects or writes those parameters. They are discovered automatically. This is why we say the model learns rather than is programmed.
Generalization vs. memorization
Here is the subtle part. We do not actually care how well the model does on the examples it trained on — we care how it does on new inputs it has never seen. That ability is called generalization, and it is the whole goal. The failure mode is overfitting: the model memorizes the training examples, including their noise and quirks, and then performs badly in the real world. A student who memorizes last year's answer key without understanding the material has overfit. To detect this, we always hold back some data the model never trains on — a test set — and judge the model only on that.
A worked example
Imagine training a model to predict a house's price from its size, location, and age. If you give it enough varied examples, it learns the general relationship and can price a house it has never seen. If you give it only ten houses and a very flexible model, it may instead memorize those ten exactly — nailing them perfectly while wildly mispricing the eleventh. More data and simpler models are two of the main cures for overfitting.
