Skip to content
Home » Unsupervised Learning

Unsupervised Learning

1. Definition

Unsupervised Learning is a type of Machine Learning in which the computer learns from unlabelled data.

In simple language:

In unsupervised learning, we give the computer data but do not give it the correct answers. The computer finds hidden patterns, relationships, or groups in the data by itself.

Unlike supervised learning, there is no teacher or predefined output.


2. Simple Example

Suppose a shopping company has information about 10,000 customers:

CustomerAgeIncomeAmount Spent
A22₹25,000₹3,000
B25₹28,000₹4,000
C45₹80,000₹25,000
D48₹85,000₹30,000

We don’t tell the computer which customer belongs to which group.

The algorithm may automatically discover:

Customer Data
      ↓
Machine Learning Algorithm
      ↓
Find Similarities
      ↓
Group 1 → Low spending customers
Group 2 → Medium spending customers
Group 3 → High spending customers

These groups are called clusters.


3. How Unsupervised Learning Works

       Unlabelled Data
             ↓
       Data Preparation
             ↓
    Unsupervised Algorithm
             ↓
   Find Patterns/Similarity
             ↓
      Groups / Patterns

Step 1: Collect Data

Data is collected from different sources.

Step 2: Give Data to the Algorithm

There are no predefined labels or answers.

Step 3: Find Similarities

The algorithm examines the characteristics of the data.

Step 4: Discover Patterns

It finds groups, relationships, or important features.

Step 5: Use the Results

The discovered groups or patterns can be used for decision-making.


4. Main Types of Unsupervised Learning

The two important areas are:

1. Clustering

Clustering means grouping similar data points together.

Examples:

  • Customer segmentation
  • Grouping products
  • Grouping documents
  • Image segmentation

Popular algorithms:

  • K-Means
  • Hierarchical Clustering
  • DBSCAN

2. Dimensionality Reduction

Dimensionality reduction means reducing the number of features while trying to retain important information.

For example:

100 Features
     ↓
    PCA
     ↓
10 Important Components

One important technique is:

PCA – Principal Component Analysis


5. Clustering

Clustering is one of the most common applications of unsupervised learning.

Suppose we have customers represented by their income and spending.

The algorithm can identify groups such as:

       Customer Data
             ↓
       Clustering
       /    |     \
      ↓     ↓      ↓
   Group 1 Group 2 Group 3
   Low     Medium  High
   Spend   Spend   Spend

The important point is that we did not tell the computer these groups beforehand.

It discovered them from the data.


6. K-Means Clustering

K-Means is a popular unsupervised learning algorithm used to divide data into K groups or clusters.

Example

Suppose:

K = 3

The algorithm tries to divide customers into:

  • Cluster 1
  • Cluster 2
  • Cluster 3

Basic steps

  1. Select the number of clusters, K.
  2. Select initial cluster centers.
  3. Assign each data point to the nearest center.
  4. Recalculate the cluster centers.
  5. Repeat the process until the clusters become stable.

Simple representation

Data Points
     ↓
Select K
     ↓
Assign points to nearest cluster
     ↓
Calculate new cluster centers
     ↓
Repeat
     ↓
Final Clusters

7. Applications of Unsupervised Learning

1. Customer Segmentation

Companies divide customers according to:

  • Age
  • Income
  • Buying behaviour
  • Spending habits

This is very useful in Digital Marketing.

For example:

Customers
   ↓
Clustering
   ↓
--------------------------------
|        |          |          |
Budget   Regular    Premium
Users    Users      Customers

The company can then create different marketing campaigns for each group.

2. Recommendation Systems

Finding groups of users with similar interests.

3. Market Research

Finding different customer behaviour patterns.

4. Fraud Detection

Identifying unusual patterns in transactions.

5. Image Processing

Grouping similar pixels or images.

6. Document Analysis

Grouping similar documents or articles.


8. Advantages of Unsupervised Learning

  1. No labelled data is required.
  2. Useful for discovering hidden patterns.
  3. Helps in customer segmentation.
  4. Can be useful for exploring large datasets.
  5. Can help reduce the number of features using techniques such as PCA.
  6. Useful when we do not know the categories in advance.

9. Disadvantages of Unsupervised Learning

  1. Results can be difficult to interpret.
  2. There may be no single correct answer against which to compare.
  3. Choosing the correct number of clusters can be difficult.
  4. Results can be affected by noisy or irrelevant data.
  5. Different algorithms may produce different groupings.

10. Supervised vs Unsupervised Learning

Supervised LearningUnsupervised Learning
Uses labelled dataUses unlabelled data
Correct output is knownCorrect output is not known
Has a teacher/guideNo predefined teacher
Predicts an outputFinds patterns/groups
Classification and regressionClustering and dimensionality reduction
Example: Spam detectionExample: Customer segmentation

Easy Example

Supervised:

“Here are 1,000 emails. I have already marked them Spam or Not Spam. Learn from them.”

Unsupervised:

“Here are 1,000 emails. Find groups of similar emails yourself.”


⭐ Exam Definition

Unsupervised Learning is a type of Machine Learning in which the algorithm learns from unlabelled data and identifies hidden patterns, relationships, or groups without predefined output labels. The major techniques include clustering and dimensionality reduction. K-Means clustering and PCA are common examples.

Easy way to remember

Supervised = Data + Answers → Learn

Unsupervised = Data → Find Patterns Yourself