Supervised vs Unsupervised Learning
Once you know machine learning means learning patterns from data, the next question is: what kind of data, and what kind of pattern? The most fundamental split in the field is between supervised and unsupervised learning.
Supervised learning: learning from labeled examples
In supervised learning, every training example comes with the correct answer attached — a label. An email is labeled spam or not-spam; a photo is labeled "cat" or "dog"; a house's size is paired with its actual sale price. The model's job during training is to get better and better at predicting the label from the rest of the example, and it can measure its own progress directly, because the correct answer is right there to check against. Supervised learning splits further into two shapes:
- Classification — predicting a category from a fixed set of options, like spam/not-spam or cat/dog/bird.
- Regression — predicting a number, like a house price or tomorrow's temperature.
Unsupervised learning: finding structure without labels
In unsupervised learning, the data has no labels at all — just raw examples, with no correct answer attached to check against. The model's job instead is to find structure that's already there: grouping similar things together, or noticing which variables tend to move together. A common example is clustering a retailer's customers by purchasing behavior into groups nobody predefined in advance — the algorithm might surface a group of "weekend bulk buyers" and a group of "frequent small purchasers" purely from patterns in the data, without ever being told those categories exist.
Why the distinction matters in practice
Which one you reach for depends entirely on what data you actually have. If you have a clear right answer for every example — a customer either did or didn't cancel their subscription — supervised learning is the natural fit. If you're trying to discover patterns you don't already know to look for — "are there natural customer segments in here?" — there's no label to supervise against, so unsupervised learning is what applies.