Module 2 · How Machine Learning Works
Learning from Data: Supervised, Unsupervised & Reinforcement Learning
65 min
Learning objectives
- Distinguish the three main machine-learning paradigms and what each needs to work
- Match a real-world problem to the paradigm best suited to solve it
- Explain the difference between classification and regression within supervised learning
Three ways a machine can learn
Machine learning is not one technique — it's a family. The biggest split is in how the system gets feedback while learning. Some systems learn from labeled examples (here's the question and the correct answer), some find structure with no answers at all, and some learn by trial and error against a goal. These are the three paradigms: supervised, unsupervised, and reinforcement learning.
Analogy
Think of three students. The first studies with an answer key (supervised). The second is handed a pile of unsorted photos and asked to group similar ones, with no key (unsupervised). The third learns to ride a bike — no one tells them the 'right' muscle movements; they just get the reward of staying upright or the penalty of falling (reinforcement).
Supervised learning: learning from labeled examples
In supervised learning, every training example comes with the correct answer attached — a label. The model studies thousands or millions of input-label pairs and learns the relationship between them, so it can predict the label for new inputs. This is the most common paradigm in business today because most valuable problems come with historical answers.
Supervised learning — Learning a mapping from inputs to outputs using examples where the correct output (label) is provided.
Example — Two flavors of supervised learning
Classification predicts a category: is this email spam or not? Is this transaction fraud? Regression predicts a number: what will this house sell for? How many units will we ship next month? Same paradigm, different kind of answer — a bucket versus a quantity.
Unsupervised learning: finding structure without answers
Unsupervised learning works on data that has no labels. The goal isn't to predict a known answer but to discover hidden structure — natural groupings, patterns, or simplified representations. Because there's no answer key, you can't grade it the same way; you judge it by whether the structure it finds is useful.
Example — Customer segmentation
A retailer has millions of customers but no pre-defined 'types.' A clustering algorithm groups customers by behavior — frequent small buyers, rare big spenders, deal-seekers — without anyone labeling them in advance. Marketing then treats each group differently.
Reinforcement learning: learning by trial and reward
In reinforcement learning, an agent takes actions in an environment and receives rewards or penalties. There are no per-example correct-answer labels; instead the agent learns from reward signals, figuring out through repeated trial and error which sequences of actions lead to the most reward over time. It powers game-playing systems, robotics, and some recommendation and control problems.
Quick test: Do you have labeled answers? → supervised. No labels, want to find structure? → unsupervised. Learning a strategy through reward and feedback over time? → reinforcement.
| Paradigm | What it needs | Typical use |
|---|---|---|
| Supervised | Labeled examples (input + correct answer) | Spam detection, price prediction, medical triage |
| Unsupervised | Unlabeled data | Customer segmentation, anomaly detection, topic discovery |
| Reinforcement | An environment with rewards/penalties | Game-playing, robotics, sequential decision-making |
Watch out
Labels are expensive. Supervised learning is powerful, but someone has to produce those correct answers — often by hand. Underestimating labeling cost and quality is one of the most common reasons ML projects stall.
Knowledge check
Quick practice — not part of your exam score.
A bank wants to predict whether each new transaction is fraudulent, using a large history of past transactions already marked 'fraud' or 'legitimate.' Which paradigm fits best?
Which task is an example of regression rather than classification?
A team has millions of customer records with no predefined categories and wants to discover natural groupings of similar customers. This is best approached with:
Sign in to track your progress and mark lessons complete.
Sign in