USD ($)
$
United States Dollar
Euro Member Countries
India Rupee
د.إ
United Arab Emirates dirham
ر.س
Saudi Arabia Riyal

Types of ML (Supervised, Unsupervised)

Lesson 33/35 | Study Time: 40 Min

Not all machine learning problems are the same, and not all ML algorithms approach them the same way. The type of ML you use depends entirely on the nature of your data and what you are trying to achieve.

The two most fundamental types are supervised learning and unsupervised learning.

Understanding the difference between them — when to use each, what problems they solve, and how they work is the essential first step before building any machine learning model.

Supervised Learning

Supervised learning is the most widely used type of ML. The word "supervised" means the algorithm is trained on labelled data — data where the correct answer is already known.

The model learns the relationship between inputs (features) and outputs (labels), then uses that relationship to predict answers for new, unseen data.

Think of it like a student learning with an answer key. They study examples with known answers, learn the pattern, and then apply that knowledge to new questions.

How Supervised Learning Works

Labelled Training Data → Train Model → Learn Pattern → Predict on New Data

Two Types of Supervised Learning


Classification — Predicting Categories

Classification assigns input data to one of several predefined categories.

1. Email → Spam or Not Spam
2. Patient data → Disease Positive or Negative
3. Image → Cat, Dog, or Bird
4. Transaction → Fraudulent or Legitimate


Regression — Predicting Numbers

Regression predicts a continuous numerical value based on input features.

1. Study hours → Exam score
2. House size + location → House price
3. Age + weight → Blood pressure
4. Advertising spend → Revenue


Common Supervised Learning Algorithms


Real-World Applications of Supervised Learning


1. Healthcare: Predicting whether a tumour is malignant or benign

2. Finance: Credit scoring, loan approval prediction

3. Email: Spam detection

4. Retail: Predicting customer churn

5. Education: Predicting student performance

Unsupervised Learning

Unsupervised learning works with unlabelled data, there are no correct answers provided. The algorithm explores the data on its own and finds hidden patterns, structures, or groupings without any guidance.

The word "unsupervised" reflects the fact that no one is telling the model what to look for.

Think of it like sorting a pile of mixed coins without being told the categories — you group them by size, colour, and shape, discovering the structure yourself.

How Unsupervised Learning Works

Unlabelled Data → Algorithm Finds Patterns → Groups or Structures Emerge

Two Main Types of Unsupervised Learning


Clustering — Finding Natural Groups

Clustering divides data into groups (clusters) where items within a group are more similar to each other than to items in other groups.


1. Customer data → Group into budget, mid-range, premium shoppers.

2. News articles → Group by topic automatically.

3. Medical records → Group patients with similar symptoms.

4. Retail transactions → Identify purchasing behaviour patterns.


Dimensionality Reduction — Simplifying Data

When a dataset has too many features, it becomes slow and difficult to work with. Dimensionality reduction compresses the data into fewer dimensions while preserving its most important structure.


1. Reduce a dataset with 100 features to 2–3 for visualization.

2. Remove redundant or highly correlated features.

3. Improve model training speed and performance.


Common technique: PCA (Principal Component Analysis)

Common Unsupervised Learning Algorithms

Real-World Applications of Unsupervised Learning


1. Marketing: Customer segmentation for targeted campaigns.

2. E-commerce: Product grouping and recommendation systems.

3. Cybersecurity: Detecting unusual patterns that indicate threats.

4. Genomics: Grouping genes with similar expression patterns.

5. Social media: Topic modelling in large text collections.

Supervised vs Unsupervised 

How to Choose Between Them

Use this simple decision guide:



A Third Type — Reinforcement Learning 

Beyond supervised and unsupervised learning, there is a third type worth knowing:


Reinforcement Learning (RL) — An agent learns by interacting with an environment, receiving rewards for good actions and penalties for bad ones. It learns through trial and error.

Used in: game-playing AI (Chess, Go), robotics, self-driving cars.


Not typically a starting point for beginner, but important to know it exists.

Sales Campaign

Sales Campaign

We have a sales campaign on our promoted courses and products. You can purchase 1 products at a discounted price up to 15% discount.