Getting Better Over Time
Remember when you first tried to write the letter A? It probably looked a little wobbly. Now imagine writing it a thousand times. By the end your A would look neat and confident. Learning machines follow the same idea. They do not get good all at once. They get better slowly, step by step, one example at a time. Today we will see how that improvement happens.
A Machine Improves by Fixing Its Mistakes
Here is how a learning machine gets better. First, the machine sees an example — say, a photo of a dog. It makes a guess: is this a cat or a dog? If the machine is brand new, it might guess wrong a lot. It might say cat when the answer is dog. Next, the machine checks its guess against the correct label. It was wrong! That mismatch is called an error. Then the machine makes a tiny adjustment inside itself — just a small tweak — to make it a little less likely to make that same mistake again. Then it moves to the next example and does the whole thing again: guess, check, adjust. Do this millions of times, and the machine goes from being mostly wrong to being mostly right. That slow journey from wrong to right is learning!
A learning machine gets better by following three steps over and over: guess, check the answer, adjust. Each tiny adjustment adds up. Millions of tiny adjustments make a very smart machine.
Imagine you are learning to throw a basketball into a hoop. You throw. Too far to the left. You notice and adjust: throw a little more to the right next time. You throw again. A little better! Still a bit short. You adjust: put a bit more power in. You throw again. Closer! Every throw teaches you something. Every adjustment makes you a little better. After hundreds of throws, you can sink the ball without even thinking much. A learning machine does exactly this, except instead of throws, it makes millions of guesses per second, and instead of muscles, it adjusts tiny numbers inside itself.
Complete this sentence about how a machine learns.
Scientists have a special name for the number that measures how wrong a machine is: they call it the error or the loss. When training starts, the loss is big — the machine is very wrong. As training continues and the machine adjusts itself again and again, the loss gets smaller and smaller. When scientists watch the loss shrink over time on a graph, they know the machine is learning. A shrinking loss means a growing machine!
More examples usually help a machine get better. But just like you need rest between study sessions, machines also need careful tuning. Too much of the same examples can actually confuse a machine. Scientists experiment to find just the right amount of practice.
What is the three-step loop that helps a machine get better?
What do scientists call the number that measures how wrong a machine is?
The Adjustment Game
- You will practice the guess-check-adjust loop yourself!
- Stand a few steps from a wastebasket. Try to toss a balled-up piece of paper into it.
- After each toss, notice: did it go left, right, short, or long?
- Make one small adjustment before your next toss.
- Keep track on paper: write a + if you got closer and a - if you got farther away.
- After 10 tosses, look at your record. Did your score improve over time?
- This is exactly how a machine's learning curve looks — bumpy at first, but generally improving!