The loop that does all the learning
Here is the whole idea in one line: make a guess, check it, adjust, repeat. That process is called training. The thing being trained is called a model. You can picture a model as a machine covered in millions of tiny dials. At the start the dials are set at random, so its guesses are junk. Every time it guesses wrong, training turns the dials a tiny bit in the direction that would have made the guess better. Nobody sets the dials by hand. The right settings emerge from the examples. When training ends, the dials hold everything the model learned.
One round of training, with cats and dogs
- Show the model a photo that a person has already marked "cat".
- The model guesses. Early on it might say "70 percent dog", which is wrong.
- Compare the guess with the mark. The gap between them is the error.
- Nudge every dial a tiny bit in the direction that shrinks that error. Then show the next photo.
Why it needs so many examples
One photo teaches almost nothing, because each nudge is deliberately tiny. That is on purpose. If one odd photo could swing the dials a long way, a single blurry cat would wreck everything learned so far. Small steps, many times, is safer. The model also needs variety. If it only ever sees orange cats sitting up, it learns "orange and upright", not "cat". So it needs black cats, sleeping cats, cats in boxes and cats half hidden. Real image models train on millions of photos for exactly this reason.
Learning a free throw
Think about learning free throws in basketball. Nobody can hand you the exact rules for your arm and wrist. So you shoot, watch where the ball goes, adjust a little, and shoot again. Too short: more push. Too far left: turn a bit. After thousands of shots your body has learned something you could never write down. The ball landing is your feedback. For a model, the feedback is the right answer attached to each example.
Supervised learning, in plain words
- A label is the right answer attached to an example: this photo is a cat, this email is spam, this song was skipped.
- Learning from labelled examples is called supervised learning, because the labels supervise the guessing. It is the most common kind of machine learning.
- Once training is finished, using the model on new examples is called inference. That is what happens each time your spam filter checks a new email.
Where do the labels come from?
Notice that every step of the loop leaned on the labels. Somebody had to mark each photo as cat or dog, and get it right. That pile of marked examples is the model's whole world. It is called training data, and it shapes what a model learns more than anything else. That is next.
Check yourself · 3 quick questions
During training, what happens right after the model makes a guess?
Show answer
The guess is compared with the right answer — The loop is guess, compare, adjust, repeat: the guess is checked against the label so the model knows how far off it was.
Why does training need so many examples?
Show answer
Because each adjustment is tiny and the model needs variety to learn the real pattern — Each nudge is deliberately small, so it takes many examples, and many kinds of example, to learn the real pattern rather than a fluke.
What is a label?
Show answer
The right answer attached to an example — A label is the correct answer for one example, such as "cat" for a photo or "spam" for an email.