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:
| Customer | Age | Income | Amount Spent |
|---|---|---|---|
| A | 22 | ₹25,000 | ₹3,000 |
| B | 25 | ₹28,000 | ₹4,000 |
| C | 45 | ₹80,000 | ₹25,000 |
| D | 48 | ₹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
- Select the number of clusters, K.
- Select initial cluster centers.
- Assign each data point to the nearest center.
- Recalculate the cluster centers.
- 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
- No labelled data is required.
- Useful for discovering hidden patterns.
- Helps in customer segmentation.
- Can be useful for exploring large datasets.
- Can help reduce the number of features using techniques such as PCA.
- Useful when we do not know the categories in advance.
9. Disadvantages of Unsupervised Learning
- Results can be difficult to interpret.
- There may be no single correct answer against which to compare.
- Choosing the correct number of clusters can be difficult.
- Results can be affected by noisy or irrelevant data.
- Different algorithms may produce different groupings.
10. Supervised vs Unsupervised Learning
| Supervised Learning | Unsupervised Learning |
|---|---|
| Uses labelled data | Uses unlabelled data |
| Correct output is known | Correct output is not known |
| Has a teacher/guide | No predefined teacher |
| Predicts an output | Finds patterns/groups |
| Classification and regression | Clustering and dimensionality reduction |
| Example: Spam detection | Example: 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
