0% found this document useful (0 votes)
19 views19 pages

EAI13

Uploaded by

22r21a0531
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views19 pages

EAI13

Uploaded by

22r21a0531
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Artificial Intelligence

Unsupervised Learning

Dr. K. Varada Rajkumar


Associate Professor
Department of Computer Science & Engineering(AIML)
M L R Institute of Technology
Overview of Presentation

• Example
• Definition of Unsupervised Learning
• Types of Unsupervised Learning
• Common Algorithms for Unsupervised Learning
• Example

Outcome of this lecture:


• Understand the concept of unsupervised learning.
Example

• Dataset: Scores of students in Math and Science.


• Objective: Group students into 3 clusters based on their performance.
• Input Data (Math, Science Scores):
Student A: (85, 90)
Student B: (88, 85)
Student C: (30, 40)
Student D: (32, 38)
Student E: (55, 50)
Student F: (60, 58)
Unsupervised Learning

• Unsupervised learning is a type of machine learning where the


model learns patterns from unlabeled data without specific output
labels. The goal is to discover hidden structures or relationships in
the data.
• Example: Grouping customers based on their shopping behavior
without knowing their categories beforehand.
Types of Unsupervised Learning

• Clustering
• Association Rules
Clustering

• The process of grouping data points with similar


characteristics.
• Example: Grouping customers by their purchasing habits (high
spenders, average spenders, etc.).
• Common Algorithms:
• k-means clustering
• Hierarchical clustering
Association Rules

• Identifying relationships between items or events in large


datasets.
• Example: Market Basket Analysis – "If a customer buys bread,
they are likely to buy butter.“
• Algorithm:
• Apriori algorithm
Common Algorithms for Unsupervised Learning

• k-means Clustering: Divides data into k clusters based on


similarity.
• Hierarchical Clustering: Builds a tree-like structure of
clusters (dendrogram).
• Apriori Algorithm: Used for association rule mining in
datasets like retail transactions.
k-means Clustering
Hierarchical Clustering
k-Means Clustering

• k-Means Clustering is an unsupervised learning algorithm that


divides data into k clusters based on their similarity.
• The goal is to ensure that points within a cluster are as similar as
possible, while points in different clusters are as different as
possible.
k-Means Clustering

How k-Means Clustering Works:


1. Choose the number of clusters (k).
• You decide how many groups you want to form (e.g., 3 clusters).
2. Initialize cluster centroids randomly.
• Each cluster starts with a randomly assigned center (centroid).
3. Assign data points to the nearest centroid.
• Every data point is assigned to the cluster whose centroid is closest to it (using Euclidean
distance).
4. Update centroids.
• The centroids are recalculated as the mean of all points within the cluster.
5. Repeat steps 3-4 until centroids no longer move or change significantly (convergence).
Example of k-Means Clustering: Student Performance Data

• Dataset: Scores of students in Math and Science.


• Objective: Group students into 3 clusters based on their performance.
• Input Data (Math, Science Scores):
Student A: (85, 90)
Student B: (88, 85)
Student C: (30, 40)
Student D: (32, 38)
Student E: (55, 50)
Student F: (60, 58)
Example of k-Means Clustering: Student Performance Data

Process:
• Choose k = 3 (since we want 3 performance groups: High, Medium, Low).
• Initialize 3 random centroids.
• Assign students to the closest centroid.
• Cluster 1 (High Performers): Students A, B
• Cluster 2 (Low Performers): Students C, D
• Cluster 3 (Average Performers): Students E, F
• Update the centroids (mean scores of each cluster).
• Reassign students if necessary and repeat until centroids stabilize.
Example of k-Means Clustering: Student Performance Data

Process of Calculating Centroids:


Cluster 1 (High Performers): Students A, B
Math Scores: 85, 88
Science Scores: 90, 85
Centroid (mean) for Cluster 1:
Math: (85 + 88) / 2 = 86.5
Science: (90 + 85) / 2 = 87.5
Centroid: (86.5, 87.5)
Example of k-Means Clustering: Student Performance Data

Cluster 2 (Low Performers): Students C, D


Math Scores: 30, 32
Science Scores: 40, 38
Centroid for Cluster 2:
Math: (30 + 32) / 2 = 31
Science: (40 + 38) / 2 = 39
Centroid: (31, 39)
Example of k-Means Clustering: Student Performance Data

Now you calculate centroid for cluster3


Example of k-Means Clustering: Student Performance Data

Cluster 3 (Average Performers): Students E, F


Math Scores: 55, 60
Science Scores: 50, 58
Centroid for Cluster 3:
Math: (55 + 60) / 2 = 57.5
Science: (50 + 58) / 2 = 54
Centroid: (57.5, 54)
Example of k-Means Clustering: Student Performance Data

• Cluster 1 (High Performers): Students A, B


• Cluster 2 (Low Performers): Students C, D
• Cluster 3 (Average Performers): Students E, F

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy