Types of Machine Learning
Table of Contents
In the previous tutorial, we learned that Machine Learning (ML) allows computers to learn patterns from data and use those patterns to make predictions or decisions.
There are different ways a machine can learn.
The three main types are:
- Supervised Learning
- Unsupervised Learning
- Reinforcement Learning
Let’s understand each one with simple examples.
🧑🏫 1. Supervised Learning
Let’s start with the easiest one.
What is Supervised Learning?
In Supervised Learning, we train the computer using data where we already know the correct answer.
Think about a teacher teaching a student.
The teacher gives a question and also provides the correct answer.
For example:
2 + 2 = 43 + 5 = 810 + 5 = 15The student learns from these examples.
Supervised Learning works in a similar way.
Example: Cat and Dog
Suppose we want a computer to identify cats and dogs.
We give it pictures along with their labels:
Here, Cat and Dog are the correct answers.
The machine-learning system uses these examples during training.
Because we already know the correct answer for the training examples, this is called Supervised Learning.
📌 What does “supervised” mean?
The word supervised means that the learning process is guided by known answers.
For example:
The model tries to learn the relationship between the input and the correct answer.
🧑🏫 Two Common Problems in Supervised Learning
Supervised Learning is commonly used for two types of problems:
Classification
The model predicts a category.
For example:
or:
Regression
The model predicts a number.
For example:
Other examples:
- Predicting house prices
- Predicting sales
- Predicting temperature
- Predicting delivery time
We’ll explore classification and regression separately later.
🧑🏫 2. Unsupervised Learning
Now let’s look at a different situation.
Suppose you have customer information:
Customer 1Customer 2Customer 3...Customer 1000But you don’t know which customers belong to which group.
There are no labels like:
You simply give the data to the machine-learning system.
The system tries to find patterns by itself.
This is called Unsupervised Learning.
Example: Customer Groups
Imagine an online shopping company has thousands of customers.
The company knows:
- How much each customer spends
- How often they shop
- What products they buy
But it doesn’t have predefined customer groups.
A machine-learning model can analyse the data and discover groups.
For example:
The model discovered these groups based on patterns in the data.
Nobody explicitly told the model:
“Create these three groups.”
🤔 Why is it called “unsupervised”?
Because there is no known answer provided during training.
Compare the two:
Supervised
Unsupervised
That’s the main difference.
🧑🏫 Common Use of Unsupervised Learning
One common use is clustering.
Clustering means grouping similar data together.
For example:
Other uses include:
- Finding unusual patterns
- Grouping customers
- Analysing large datasets
- Finding relationships in data
🎮 3. Reinforcement Learning
Now let’s look at a very different way of learning.
Imagine teaching a child to play a game.
The child tries something.
If the result is good, you say:
“Good!”
If the result is bad, you say:
“Try again.”
Over time, the child learns which actions produce better results.
This is the basic idea behind Reinforcement Learning.
⚙️ How does Reinforcement Learning work?
There are usually three important concepts:
- Agent
- Environment
- Reward
Let’s use a simple game.
The agent is the system that is learning.
The environment is the world in which it operates.
The action is what the agent does.
The reward tells the agent whether the action was useful.
💡 Simple Example: Robot Learning to Move
Imagine a robot that needs to reach a destination.
At first, it doesn’t know the best path.
It tries different actions:
Over many attempts, it learns which actions are more useful.
This is Reinforcement Learning.
💡 Another Example: Game Playing
Imagine an AI playing a game.
If the AI wins, it receives a positive reward.
If it loses, it receives a negative reward or no reward.
After many attempts, the AI can learn strategies that increase its chances of winning.
📌 Comparing the Three Types
Now let’s put them together.
| Type | What does the model receive? | Main idea |
|---|---|---|
| Supervised Learning | Data + correct answers | Learn from examples |
| Unsupervised Learning | Data without answers | Find patterns |
| Reinforcement Learning | Actions + rewards | Learn through trial and error |
A simple way to remember:
Supervised"Here is the question and the answer.Learn from it."
Unsupervised"Here is the data.Find interesting patterns."
Reinforcement"Try something.I'll tell you whether it was good or bad."🤖 Where Do These Fit Into AI?
We can now expand our AI map:
But we’re still missing one very important concept.
You may have heard terms like:
Where do these fit?
Let’s continue building the picture.
📈 Machine Learning → Deep Learning
Some Machine Learning systems use neural networks.
When neural networks have many layers, we commonly refer to this as Deep Learning.
So our picture becomes:
Deep Learning is extremely important because it enabled major improvements in areas such as:
- Image recognition
- Speech recognition
- Language processing
- Computer vision
- Generative AI
And this is where we are getting closer to technologies such as ChatGPT.
📌 Important Point
Don’t think:
“Supervised Learning = old AI and Generative AI = completely different AI.”
These concepts can overlap.
Modern AI systems can use different learning techniques at different stages.
For example, a modern AI model may involve:
We’ll understand this later.
For now, the important thing is understanding the basic learning approaches.
🧩 Key Points
-
Supervised Learning
The model learns from examples with known answers.
-
Unsupervised Learning
The model learns from data without predefined answers.
-
Reinforcement Learning
The model learns through actions and rewards.
🚀 What Comes Next?
We now understand:
The next important question is:
How does a machine-learning model actually learn these patterns?
To understand that, we need to learn about Neural Networks.
We’ll start with a very simple idea of inputs → processing → output, and then gradually understand neurons, layers, training, and why neural networks became so important for modern AI.