Adjusting for Next Time (Optimization)
Tuning for the Right Result
Imagine stepping into a hotel shower and finding the water is freezing. You don't randomly spin the dial in full circles. You nudge it slightly toward hot, wait, and test it again. Optimization is that same process: deciding exactly how much to turn the model's internal dials to get the next guess closer to the truth.
The Master Tuner
Inside our glowing brain model are millions of internal settings called weights. Think of these as volume knobs or sliders. When the 'Check' phase shows a high loss, the 'Adjust' phase—the optimizer—steps in. It checks which dials caused the error and nudges each one in the direction that makes the loss smaller.
You Are the Optimizer
Let's train a model to price this house. The actual value is five hundred thousand dollars. The first random guess is way off at two hundred eighty thousand. Click the 'Adjust' chip to nudge the weights and improve the next guess. Good nudge. The guess is now three hundred ninety thousand. Notice the loss bar dropping. It's still too low, so let's adjust again. We're closing in at four hundred seventy-five thousand. Because we are close, the optimizer takes a smaller, gentler step to avoid overshooting the target. Excellent. At four hundred ninety-nine thousand, the error is negligible. The dials are calibrated and the model is ready.
The Full Tour: Epochs
In the real world, a model doesn't just look at one house. It trains on thousands. An 'epoch' is one complete pass through every single example in the dataset. The model repeats this full tour hundreds of times, nudging its weights during every pass until the total loss finally settles at its lowest point.
Lesson Recap
We've completed the Guess, Check, and Adjust cycle. Remember that learning is iterative—accuracy isn't found in one giant leap, but in thousands of tiny, calculated nudges. Review these terms before we move on to how we test our model's new skills.