🤖What is Machine Learning?
From examples to predictions
Take your time with this one. The interactive parts are here to help you test the idea, not rush through it.
Pause and experiment as you go.
Before We Begin
What we are learning today
Traditional programming is following a recipe. Machine learning is more like giving the computer many finished cakes and letting it reverse-engineer the recipe. It learns patterns that guide future decisions.
How this lesson fits
Here’s where the magic shows up: we stop hand-writing every rule and let data teach the model. Think of it as coaching instead of scripting.
The big question
How can a machine spot patterns from examples the way a student learns from practice problems?
Why You Should Care
This is the skeleton of every AI headline you hear: data, model, training, prediction. Once you see that structure, the buzzwords become clear.
Where this is used today
- ✓Netflix / Spotify recommendations
- ✓Credit card fraud detection
- ✓Email spam filters
Think of it like this
Like teaching a dog a new trick. You don’t move its paws for it—you reward the closer attempts until it figures it out.
Easy mistake to make
Learning patterns is not the same as human understanding. A model can perform well without “knowing” meaning like we do.
By the end, you should be able to say:
- Explain machine learning in plain language
- Distinguish supervised, unsupervised, and reinforcement learning
- Identify the roles of data, labels, features, and predictions
Think about this first
What’s an example of a task that’s easier to learn from examples than to program by hand? Why?
Words we will keep using
What is Machine Learning?
Here is the simplest way to think about machine learning: instead of writing every rule by hand, you give the computer examples and let it discover a useful pattern. That is why ML is powerful on tasks where hand-written rules would be too long, too fragile, or too hard to invent.
Three Flavours of ML
Supervised Learning in Action: Line Fitting
This is one of the cleanest ML examples. We show the model points, and it tries to draw the line that matches them as well as possible. The red segments show the mistakes. The blue line is the model's best attempt.
Try dragging the Noise slider. Notice how the dots scatter. The model struggles to find a clean line when the data gets messy.
Key Vocabulary
Quick Check
Imagine you have 10,000 emails already marked as “Spam” or “Not Spam.” You want to train a model to spot spam in the future. What kind of machine learning is that?