Supervised vs. Unsupervised Learning
The two main families of machine learning and when to use each.
Inspired by learning material from Microsoft
Machine learning approaches fall into a few families. The two most common are supervised and unsupervised learning.
Supervised learning
The data is labeled — each example comes with the correct answer. The model learns to predict that answer.
- Classification: predict a category (spam / not spam).
- Regression: predict a number (tomorrow's temperature).
Unsupervised learning
The data is unlabeled. The model finds structure on its own.
- Clustering: group similar items (customer segments).
- Dimensionality reduction: compress data while keeping its essence.
Bonus: reinforcement learning
An agent learns by trial and error, receiving rewards for good actions — used in robotics and game-playing AI.
How to choose
- Have labeled examples and a clear target? Use supervised.
- Just exploring structure in raw data? Use unsupervised.
Key takeaways
- Supervised = learn from labeled answers.
- Unsupervised = discover hidden structure.
- The right choice depends on your data and goal.