๐ค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 writes the rule first and runs it on data. Machine learning flips that arrangement: we provide examples, define the outcome we care about, and let the system fit a rule that works well on similar future cases. This lesson gives students the vocabulary to talk about that shift precisely.
How this lesson fits
This module is where the course shifts from explicit rules to learned patterns. Instead of telling the machine exactly what to do in every case, we give it examples, define success, and let it infer a decision rule from the data.
The big question
How can a machine study examples, extract useful patterns, and make predictions on cases it has never seen before?
Why You Should Care
This lesson is the skeleton behind most modern AI products: data comes in, a model is trained, and predictions come out. Once students can name those moving parts, the rest of the field becomes easier to reason about and critique.
Where this is used today
- โRecommendation systems that learn user preferences from past clicks, views, and purchases
- โFraud detection systems that spot unusual transaction patterns in real time
- โSpam filters that learn the difference between trustworthy and suspicious messages
Think of it like this
It is like teaching by worked examples rather than by one perfect lecture. The learner studies many past cases, notices recurring patterns, and gradually becomes better at handling new ones that resemble what it has seen before.
Easy mistake to make
A model that learns patterns from data is not automatically understanding the world the way a person does. Strong performance and human-like understanding are not the same thing.
By the end, you should be able to say:
- Explain machine learning in everyday language without losing technical accuracy
- Distinguish supervised, unsupervised, and reinforcement learning by the type of feedback each receives
- Identify the roles of data, features, labels, targets, models, and predictions
Think about this first
Name a task that would be painful to hand-code rule by rule but manageable if you had thousands of examples. What makes the example-based approach better?
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?