Picture two very different jobs. In the first, someone hands you a box of buttons where every single button already has a little tag tied to it — "shirt button", "coat button", "spare" — and your job is simply to learn what makes each category recognisable, so you can sort a fresh pile of untagged buttons the same way. In the second, someone hands you a box of buttons with no tags at all, and just says "sort these somehow" — nobody tells you the categories; you have to notice for yourself that some buttons are big and wooden, some are small and shiny, and group them by whatever similarities you spot.
That difference — learning with an answer key versus learning without one — is exactly the split between the two great families of machine learning. Notice that the data can be identical in both jobs — the same box of buttons, the same pile of emails — what changes is purely whether each item already carries a trustworthy answer.
The same points, two situations. In the supervised view they arrive pre-coloured by their true class — imagine each dot is a labelled email, red for spam, blue for not-spam — and the model's job is to learn the boundary that separates them, so it can colour the next email itself. In the unsupervised view every dot is the same plain colour — nobody has told the model which class is which, or even that there are exactly two — and it must discover that two natural groups exist, purely by noticing which points sit close together. Toggle between the two views below.
A quick way to tell them apart: ask "do my examples come with a correct answer already attached?" If yes, it's supervised. If it's just a pile of data with no answer key, it's unsupervised.
Here's something that surprises beginners: collecting raw data is often cheap and easy — a warehouse's security cameras happily generate millions of unlabelled photos every single day — but turning that raw data into labelled training examples usually means paying real people to sit and tag each one by hand: "this photo shows a forklift," "this one shows a spill." That's slow and expensive, which is exactly why unsupervised learning is so attractive whenever it can do the job — it skips the labelling bill entirely by working with the raw, untagged pile.
This is also why semi-supervised learning exists: imagine a company has painstakingly labelled 200 warehouse photos but has a million more sitting unlabelled. Throwing away the 999,800 unlabelled photos would waste almost the entire dataset — a semi-supervised approach instead uses the small labelled batch to get started, then leans on the huge unlabelled pile to sharpen its sense of what "normal" data even looks like.
The question "do I have labelled answers?" decides everything downstream — which algorithms
apply, how you measure success, even how much data you need (labelling examples by hand is often
the most expensive part of a whole project). Most of this course is
supervised (it's where the clearest ideas live), starting with
There are a couple of other flavours worth knowing exist, even without the full story yet. Semi-supervised learning sits in between: you have a small pile of labelled examples and a much bigger pile of unlabelled ones, and the model uses both. And reinforcement learning is a different shape of problem entirely — there's no fixed dataset of labelled examples at all; instead an agent takes actions in a world and learns from the rewards and penalties those actions earn it over time, the way a dog learns tricks from treats — try a move, see whether it helped or hurt, and adjust next time. A game-playing program that gets better purely by playing thousands of matches against itself, earning a "win" reward or a "loss" penalty at the end of each one, is doing reinforcement learning, not supervised learning — nobody ever handed it a labelled list of "correct moves" to copy. Both semi-supervised and reinforcement learning are stories for another day, once you have the supervised/unsupervised split firmly in hand.
Two traps to watch for, one for each family:
Here's a quirk that trips people up the first time they meet unsupervised learning: many clustering algorithms need to be told in advance how many groups to look for — split this data into exactly 3 clusters, say — even though finding the "right" number of groups is often half the problem. Ask for 2 clusters and it will find 2, whether or not 2 is a sensible answer; ask for 8 and it will find 8. Choosing a good number of clusters is its own small art, often done by trying several values and seeing which one tells the most useful story about the data. Ask a clustering algorithm for 2 groups in a customer database and it might split "big spenders" from "occasional shoppers"; ask the very same algorithm, on the very same data, for 5 groups and it will confidently carve out five different-looking segments instead — neither answer is "wrong," because there was never a single correct number of groups baked into the data to begin with.
The next time a streaming app nails a recommendation, it's probably combining both families at once. An unsupervised step often clusters viewers with similar taste together without anybody defining what those tastes are — "people who liked these three shows also tend to like these five others" emerges purely from viewing patterns, with no human-written categories at all. Then a supervised step, trained on your actual past ratings and clicks (the labels), predicts how many stars you specifically would give something you haven't watched yet. Unsupervised finds the hidden structure; supervised turns it into a confident, personal prediction.
Retailers have found genuinely surprising customer segments this way — groups of shoppers who share a habit nobody in the marketing department had ever named or thought to look for, discovered purely because an unsupervised algorithm noticed they behaved alike.