What machine learning actually is
The one-sentence idea behind every ML system, explained with no jargon before we add any.
The oldest way to program a computer
Normal programming looks like this: you write down the rules, and the computer follows them.
IF email contains "you have won a lottery"
THEN mark as spam
You, the human, sat down and figured out the rule. The computer just executes it. This works great until the rules get complicated. Spam writers stopped writing "lottery" and started writing "l0ttery", "won$$$", "FREE money now!!", in nineteen different languages, with the sentence structured a hundred different ways. Nobody can sit down and write a rule for every trick a spammer will ever think of. There are too many, and new ones show up every day.
The machine learning way
Machine learning flips the direction. Instead of you writing the rule, you show the computer a pile of examples — thousands of emails, each one already labeled "spam" or "not spam" — and you let the computer figure out the rule itself.
Examples IN → [ Learning Algorithm ] → Rule OUT
That's it. That's the whole idea. Machine learning is a way of getting rules out of examples, instead of typing the rules in yourself.
Teaching a child what a dog is doesn't involve handing them a rulebook ("four legs, fur, a tail, barks..."). You just point at enough dogs — big ones, small ones, fluffy ones, three-legged ones — and say "dog" each time. Eventually they can spot a dog they've never seen before. Nobody wrote the rule down. It got built from examples.
What we actually mean by "learning"
There's no magic here, and no consciousness. When we say a model "learns," we mean something very mechanical: it has a bunch of adjustable knobs (called parameters), and there's a process that turns those knobs until the model's guesses stop being so wrong.
You'll see this exact loop in every ML system that exists:
- Look at an example, make a guess.
- Compare the guess to the real answer.
- Nudge the knobs a tiny bit so next time's guess would have been a little better.
- Repeat this millions of times across millions of examples.
That's genuinely the whole trick. Later lessons put real math under "nudge the knobs," but the shape of the idea never changes — guess, check, adjust, repeat.
Why now, and not 30 years ago
Three things had to line up before this became practical, and it's worth knowing them because they explain a lot of how the field talks about itself:
- Data. You need a lot of labeled examples. The internet made this possible — millions of photos, sentences, and clicks, all sitting around waiting to be examples.
- Compute. Turning millions of knobs based on millions of examples, over and over, needs serious processing power. GPUs, originally built for video game graphics, turned out to be extremely good at this kind of math.
- Better algorithms. The core ideas (some from the 1950s–80s) needed refinement to actually work well at large scale.
A concrete example before we go further
Say you want to predict the price of a house. The old way: you'd sit down and write a formula — maybeprice = 1000 * size_in_sqft + 50000. You guessed those numbers from intuition. It'll be wrong a lot.
The machine learning way: you gather 10,000 real house sales — their size, location, age, number of rooms, and the price they actually sold for. You let an algorithm find the numbers in that formula (or a far more complicated one) that best match what actually happened in those 10,000 sales. The computer isn't inventing new physics — it's just really, really good at finding the numbers that fit the data, faster and more thoroughly than a human ever could.
That's the whole subject. Everything from spam filters to self-driving cars to ChatGPT is a bigger, fancier version of "find the numbers that best fit the examples." The rest of this course is spent making that sentence precise.
What's next
The next lesson splits "learning from examples" into the handful of different shapes that problem can take — because "predicting a house price" and "grouping similar customers together" are solved differently, even though both are "machine learning."