Machine Learning
Finding rules from examples instead of writing them by hand
- Machine learning is a way of getting a rule out of examples, instead of a person writing the rule down, by showing a pile of examples and letting it find the rule itself.
- The process of finding it is called training, and the block of rules left over once training finishes is called a model.
- Artificial intelligence is the big container, machine learning sits inside it, and deep learning sits inside machine learning again.
- Examples are the raw material. Feed it only lopsided examples and it learns a lopsided rule.
- The goal isn't memorizing — it's getting the right answer even on something it's never seen. That ability is called generalization.
Contents
1The analogy
Start brewing coffee at home and it doesn't take long to notice: matching the water temperature and time exactly to what's printed on the bag still gives you a different taste every day. The beans are different, the grind is different, the water is different. No instruction manual exists that covers every case.
So people take a different approach. They brew it a little differently each day and taste the result. Today, cool the water down a bit; tomorrow, grind coarser — and note each time whether it turned out well or fell short. By about the twentieth cup, something strange happens: a rule nobody ever wrote down is sitting there in your hands. This bean, slightly coarser; the water, slightly cooler.
That's what machine learning does. Instead of taking a rule dictated to it, it tries a lot of things, watches the results, and works the rule out backward. Then, when a new bag of beans shows up, it uses that rule to nail the first cup.
2In detail
It flipped the direction rules get written in
Old-style programs had a person write the rule first, and the machine just followed it: if the input looks like this, the output should look like that. That approach is still the best one, even today, for jobs where the rule is clear. There's no reason to bring machine learning into a calculator.
The trouble is there are far more jobs where the rule can't be written down at all. Try to write out a rule for recognizing a handwritten digit and you get stuck on the first line. Everyone writes a 3 a little differently, and there's no way to put that difference into words.
Machine learning flips the arrow. What a person hands over isn't a rule — it's examples. Give it tens of thousands of handwritten 3s along with a mark saying "this is a 3," and the machine finds what they have in common and builds the rule itself. A person only says what they want; the machine fills in how.
Training passes through, and a model is what's left
Machine learning splits into two broad stretches of time. The first is training. Looking at examples one by one, it nudges the countless dials inside itself a little each time — turning the dial by exactly however much the answer missed, over and over, millions of times. In the coffee analogy, that's the time spent brewing it a little differently each day.
Once that stretch ends, the dials settle into some final state. That settled state, saved whole, is the model. Training takes a long time and costs a lot, but it only has to happen once; using the finished model afterward is fast and can be done as many times as you like. It's like how figuring out the coffee rule took twenty cups, but once it's found, brewing it the same way every morning is all there is to it.
That's why training and model always show up together in machine learning talk. Training points to the process; model points to what that process leaves behind.
The quality of the examples decides the result
Machine learning only finds a rule inside the examples it was shown. So if the examples lean one way, the rule comes out leaning the exact same way. A model taught only on daytime photos wobbles in front of nighttime ones — the same way a coffee rule dialed in for one household's beans doesn't carry over to a different shop's beans.
It's the same if the answer attached to an example is wrong. The machine doesn't question that mark — it learns it exactly as given. That's why, in practice, far more time goes into gathering and cleaning up examples than into fixing the model itself.
What's memorized and what's learned are different things
Memorize the examples outright and a test goes well, since it's just being asked about things it's already seen. But run into something new and it falls apart. In machine learning, this state is called overfitting.
That's why the examples used for training get set apart from the examples used for checking. Testing on examples it was never shown even once during training is the only way to know whether it actually found a rule. This ability to hold up on something new is called generalization, and it's always what machine learning is really chasing.
There are several ways to learn, too
Giving it the answer alongside the example is the most common approach. Pair a photo with what it is, and the machine learns the relationship. This is called supervised learning.
There's also a way that gives only examples, with no answer attached. Let similar things clump together on their own and things like customer groups or clusters of writing surface naturally. This is unsupervised learning. And there's reinforcement learning too, where it gets a higher score for doing well and a lower one for doing poorly, and works out its own approach from that — something close to dialing in coffee flavor by score alone.
3More precisely
Machine learning is a family of statistical methods that estimate a rule from data. What's called training is, in practice, a repeated cycle: measuring how far a prediction misses the answer as a single number, then nudging the dials a little in whichever direction shrinks that number. The ruler that measures how far off it was is called the loss function, and the method for finding the direction that shrinks it is called gradient descent.
The coffee analogy breaks down in a few places. A person gets a feel for it after about twenty cups; machine learning usually needs tens of thousands to billions of examples. A person tastes something once and can even guess at why; the machine never understands why — it only finds a combination of numbers that happens to fit. That's why, if some coincidental feature that has nothing to do with the beans happens to move alongside the taste, it can end up treating that as the rule. And a badly brewed cup of coffee just gets poured out; a badly trained model repeats the same bias, identically, to millions of people — that gap matters a great deal.
4Try it yourself
5Common misconceptions
It's easy to think machine learning is just another name for artificial intelligence, but actually it's one of several ways to build artificial intelligence, and right now it's simply the one working best.
It's easy to think throwing in more data automatically makes things work well, but actually if the examples lean one way or the attached answers are wrong, it learns those flaws exactly as they are.
It's easy to think a model keeps getting smarter after training ends, but actually a trained model stays frozen right where it finished, and it won't change again unless it gets trained anew.
7One-line summary
In shortMachine learning is a way of showing a pile of examples instead of writing down a rule and letting the machine work the rule out for itself, and what's left over from that is called a model.
Spotted an error or have a better analogy? Suggest an edit · Last updated2026-09-02