Types of Machine Learning: Supervised, Unsupervised and Reinforcement
Machine learning comes in three main types. See how supervised, unsupervised and reinforcement learning differ, with everyday examples and a comparison table.
Short answer: machine learning has three main types. Supervised learning learns from examples with correct answers, unsupervised learning finds patterns in data without answers, and reinforcement learning learns by trying actions and receiving rewards. Which one you use depends on the data you have and the problem you want to solve.
What Is Machine Learning?
Machine learning (ML) is a way of building software that learns patterns from data instead of following rules written by hand. Rather than telling a program exactly how to spot spam, you show it many emails and let it find what spam looks like. For how ML relates to AI and deep learning, see AI vs Machine Learning vs Deep Learning.
1. Supervised Learning
In supervised learning, every training example comes with a label, the correct answer. The model learns to map inputs to those answers, then predicts answers for new data. It is like studying with a textbook that has an answer key.
There are two common tasks:
Classification: choose a category. Example: is this email spam or not spam?
Regression: predict a number. Example: estimate a house's price from its size and location.
2. Unsupervised Learning
In unsupervised learning there are no labels. The model looks at the data and finds structure on its own. It is like sorting a pile of unlabelled photos into groups that look similar.
Clustering: group similar items. Example: group shop customers by buying habits.
Dimensionality reduction: simplify data with many columns while keeping what matters.
Anomaly detection: spot unusual items, such as an odd transaction.
3. Reinforcement Learning
In reinforcement learning, an agent takes actions in an environment and gets rewards or penalties. Over many attempts it learns which actions earn the most reward. It is like teaching a dog a trick with treats.
Typical examples are game-playing programs and robots learning to walk. It is also used in some methods for improving how language models respond to people.
Comparison Table
Supervised | Unsupervised | Reinforcement | |
|---|---|---|---|
Data | Labelled examples | Unlabelled data | Interaction with an environment |
Goal | Predict the right answer | Discover structure | Maximise total reward |
Feedback | Correct answers | None | Rewards and penalties |
Everyday example | Spam filter, price prediction | Customer groups | Game-playing agent |
What About Semi-Supervised and Self-Supervised Learning?
Real projects often sit between these types:
Semi-supervised learning uses a small amount of labelled data together with a lot of unlabelled data. It helps when labelling is slow or costly.
Self-supervised learning creates its own labels from the data. Large language models are trained this way: the text itself provides the answer, as the model learns to predict the next word. Read more in What Is a Large Language Model?
How to Choose
Do you have labelled examples of the right answer? Use supervised learning.
Do you only have raw data and want to explore it? Try unsupervised learning.
Does the problem involve a sequence of decisions with feedback? Consider reinforcement learning.
Common Mistakes and Interview Tip
Calling clustering a classification task. Classification needs labels. Clustering does not.
Assuming more data always fixes things. Bad or biased labels produce a bad model.
Interview tip: when asked to explain the types, give one concrete example for each and say what kind of data it needs. That shows real understanding.
For a gentle explanation of how machines learn from data, read the chapter How Machines Learn From Data.
Key Takeaway
Supervised learning uses answers, unsupervised learning finds patterns, and reinforcement learning uses rewards. Start with supervised learning, since most beginner projects use it.
Ready to start? Understand how machines learn, and what AI can and cannot do, without needing any maths or code. Begin with the free course How AI Works: Foundations for Everyone.
Related articles
More in Machine Learning
Comments
Sign in to join the discussion.