SlideShare a Scribd company logo
K-MEANS CLUSTERING
Presentation Outline:
1. What is K-means Clustering
2. Limitation of K-means
3. K-means Algorithm
4. Example of k-means++ clustering
5. Initialization with k-means++
6. K- means++ Visualized
Page-2
What is K-means Clustering:
K-means clustering is a type of unsupervised learning, which is used when you
have unlabeled data (i.e., data without defined categories or groups). The goal of
this algorithm is to find groups in the data, with the number of groups represented
by the variable K. The algorithm works iteratively to assign each data point to one
of K groups based on the features that are provided. Data points are clustered
based on feature similarity. The results of the K-means clustering algorithm are:
1.The centroids of the K clusters, which can be used to label new data
2.Labels for the training data (each data point is assigned to a single cluster)
Page-3
Limitations of K-means:
1. Clusters of different size
2. Clusters of different density
3. Clusters of non-globular shape
4. Sensitive to initialization
Page-4
K-means Algorithm:
The exact algorithm is as follows:
1. Choose one center uniformly at random from among the data points.
2. For each data point x, compute D(x), the distance between x and the nearest center that
has already been chosen.
3. Choose one new data point at random as a new center, using a weighted probability
distribution where a point x is chosen with probability proportional to D(x)2.
4. Repeat Steps 2 and 3 until k centers have been chosen.
5. Now that the initial centers have been chosen, proceed using standard K-means
clustering.
Page-5
Here, K= 3
Data Sets= A1(2,8) , A2(6,9) , A3(4,8) , A4(8,4) , A5(4,9) , A6(5,8) , A7(3,4)
A1
A2
A3
A4
A5
A6
A7
C1
C2
C3
Figure: Data points
Page-6
Date Sets
A1(2,8)
A2(6,9)
A3(4,8)
A4(8,4)
A5(4,9)
A6(5,8)
A7(3,4)
Let,
M1 = A1(2,8)
M2 = A5(4,9)
M3 = A7(3,4)
Calculation:
|X2-X1| + |Y2-Y1|
Page-7
Table:
Data Points K1
M1= A1(2,8)
K2
M2 = A5(4,9)
K3
M3 = A7(3,4)
New Cluster
A1(2,8) 0 3 7 1
A2(6,9) 5 2 8 2
A3(4,8) 2 1 5 2
A4(8,4) 10 9 5 3
A5(4,9) 3 0 6 2
A6(5,8) 3 2 6 2
A7(3,4) 5 6 0 3
Page-8
Table-2:
Data Points K1
M1= A1(2,8)
K2
M2 = A5(4,8)
K3
M3 = A7(5,4)
New Cluster
A1(2,8) 0 2 7 1
A2(6,9) 5 3 6 2
A3(4,8) 2 0 5 2
A4(8,4) 10 8 3 3
A5(4,9) 3 1 6 2
A6(5,8) 3 1 4 2
A7(3,4) 5 5 1 3
Page-9
Initialization with k-means++
1. Choose first cluster center uniformly at random from data points.
2. For each obs x, compute distance d(x) to nearest cluster center
3. Choose new cluster center from amongst data points, with probability of
X being chosen proportional to d(X)2
4. Repeat steps 2 and 3 until k centers have been chosen.
Page-10
K- means++ Visualized
Figure: Data points
Page-11
Thank you for being
with me up to now.
Page-12

More Related Content

PPTX
K-means clustering algorithm
PDF
Data clustering
PPT
Cluster analysis
PDF
Machine Learning Clustering
PPT
K means Clustering Algorithm
PDF
K means and dbscan
PPTX
Machine learning for wireless networks @Bestcom2016
PPTX
Machine learning clustering
K-means clustering algorithm
Data clustering
Cluster analysis
Machine Learning Clustering
K means Clustering Algorithm
K means and dbscan
Machine learning for wireless networks @Bestcom2016
Machine learning clustering

What's hot (20)

PPTX
Data aggregation in wireless sensor networks
PPT
Fuzzy c means clustering protocol for wireless sensor networks
PPTX
Clustering, k-means clustering
PPTX
Fuzzy Clustering(C-means, K-means)
PPT
K mean-clustering algorithm
PPTX
03 Communities in Networks (2017)
PPT
Fuzzy c-means clustering for image segmentation
PPTX
Cluster computing
PPTX
Kruskal Algorithm
PPTX
Types of clustering and different types of clustering algorithms
PPTX
K-Means clustring @jax
PPTX
Clusters techniques
PPTX
Clustering in data Mining (Data Mining)
PPTX
Presentation on K-Means Clustering
PPTX
Density based methods
PDF
Unsupervised Learning in Machine Learning
PDF
Handling Imbalanced Data: SMOTE vs. Random Undersampling
PPTX
Lecture 21 problem reduction search ao star search
PPTX
Text clustering
PPTX
Handling noisy data
Data aggregation in wireless sensor networks
Fuzzy c means clustering protocol for wireless sensor networks
Clustering, k-means clustering
Fuzzy Clustering(C-means, K-means)
K mean-clustering algorithm
03 Communities in Networks (2017)
Fuzzy c-means clustering for image segmentation
Cluster computing
Kruskal Algorithm
Types of clustering and different types of clustering algorithms
K-Means clustring @jax
Clusters techniques
Clustering in data Mining (Data Mining)
Presentation on K-Means Clustering
Density based methods
Unsupervised Learning in Machine Learning
Handling Imbalanced Data: SMOTE vs. Random Undersampling
Lecture 21 problem reduction search ao star search
Text clustering
Handling noisy data
Ad

Similar to K means clustering | K Means ++ (20)

PPT
k-mean-clustering for data classification
PPT
K mean clustering algorithm unsupervised learning
PPT
k-mean-clustering big data analaysis.ppt
PPT
Lecture_3_k-mean-clustering.ppt
PDF
Optimising Data Using K-Means Clustering Algorithm
PPT
K mean-clustering
DOCX
Neural nw k means
PPTX
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...
PPTX
"k-means-clustering" presentation @ Papers We Love Bucharest
PPTX
K-Means clustering and its working .pptx
PPT
Enhance The K Means Algorithm On Spatial Dataset
PDF
k-mean-clustering.pdf
PDF
MLT Unit4.pdffdhngnrfgrgrfflmbpmpphfhbomf
PDF
MLT Unit4.pdfgmgkgmflbmrfmbrfmbfrmbofl;mb;lf
PPT
K mean-clustering
PPT
k-mean-clustering (1) clustering topic explanation
PPT
Unsupervised Machine Learning, Clustering, K-Means
PPT
k-mean-Clustering impact on AI using DSS
PPT
k-mean-clustering algorithm with example.ppt
PPT
k-mean-clustering.ppt
k-mean-clustering for data classification
K mean clustering algorithm unsupervised learning
k-mean-clustering big data analaysis.ppt
Lecture_3_k-mean-clustering.ppt
Optimising Data Using K-Means Clustering Algorithm
K mean-clustering
Neural nw k means
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...
"k-means-clustering" presentation @ Papers We Love Bucharest
K-Means clustering and its working .pptx
Enhance The K Means Algorithm On Spatial Dataset
k-mean-clustering.pdf
MLT Unit4.pdffdhngnrfgrgrfflmbpmpphfhbomf
MLT Unit4.pdfgmgkgmflbmrfmbrfmbfrmbofl;mb;lf
K mean-clustering
k-mean-clustering (1) clustering topic explanation
Unsupervised Machine Learning, Clustering, K-Means
k-mean-Clustering impact on AI using DSS
k-mean-clustering algorithm with example.ppt
k-mean-clustering.ppt
Ad

Recently uploaded (20)

PDF
Introduction to Data Science and Data Analysis
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
PPTX
climate analysis of Dhaka ,Banglades.pptx
PPTX
STERILIZATION AND DISINFECTION-1.ppthhhbx
PDF
Oracle OFSAA_ The Complete Guide to Transforming Financial Risk Management an...
PPTX
Database Infoormation System (DBIS).pptx
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPTX
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
PPTX
A Complete Guide to Streamlining Business Processes
PDF
Introduction to the R Programming Language
PPTX
modul_python (1).pptx for professional and student
PDF
Lecture1 pattern recognition............
PPTX
Modelling in Business Intelligence , information system
PPT
DATA COLLECTION METHODS-ppt for nursing research
PPTX
QUANTUM_COMPUTING_AND_ITS_POTENTIAL_APPLICATIONS[2].pptx
PDF
Business Analytics and business intelligence.pdf
Introduction to Data Science and Data Analysis
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
Galatica Smart Energy Infrastructure Startup Pitch Deck
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
climate analysis of Dhaka ,Banglades.pptx
STERILIZATION AND DISINFECTION-1.ppthhhbx
Oracle OFSAA_ The Complete Guide to Transforming Financial Risk Management an...
Database Infoormation System (DBIS).pptx
Qualitative Qantitative and Mixed Methods.pptx
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
A Complete Guide to Streamlining Business Processes
Introduction to the R Programming Language
modul_python (1).pptx for professional and student
Lecture1 pattern recognition............
Modelling in Business Intelligence , information system
DATA COLLECTION METHODS-ppt for nursing research
QUANTUM_COMPUTING_AND_ITS_POTENTIAL_APPLICATIONS[2].pptx
Business Analytics and business intelligence.pdf

K means clustering | K Means ++

  • 2. Presentation Outline: 1. What is K-means Clustering 2. Limitation of K-means 3. K-means Algorithm 4. Example of k-means++ clustering 5. Initialization with k-means++ 6. K- means++ Visualized Page-2
  • 3. What is K-means Clustering: K-means clustering is a type of unsupervised learning, which is used when you have unlabeled data (i.e., data without defined categories or groups). The goal of this algorithm is to find groups in the data, with the number of groups represented by the variable K. The algorithm works iteratively to assign each data point to one of K groups based on the features that are provided. Data points are clustered based on feature similarity. The results of the K-means clustering algorithm are: 1.The centroids of the K clusters, which can be used to label new data 2.Labels for the training data (each data point is assigned to a single cluster) Page-3
  • 4. Limitations of K-means: 1. Clusters of different size 2. Clusters of different density 3. Clusters of non-globular shape 4. Sensitive to initialization Page-4
  • 5. K-means Algorithm: The exact algorithm is as follows: 1. Choose one center uniformly at random from among the data points. 2. For each data point x, compute D(x), the distance between x and the nearest center that has already been chosen. 3. Choose one new data point at random as a new center, using a weighted probability distribution where a point x is chosen with probability proportional to D(x)2. 4. Repeat Steps 2 and 3 until k centers have been chosen. 5. Now that the initial centers have been chosen, proceed using standard K-means clustering. Page-5
  • 6. Here, K= 3 Data Sets= A1(2,8) , A2(6,9) , A3(4,8) , A4(8,4) , A5(4,9) , A6(5,8) , A7(3,4) A1 A2 A3 A4 A5 A6 A7 C1 C2 C3 Figure: Data points Page-6
  • 7. Date Sets A1(2,8) A2(6,9) A3(4,8) A4(8,4) A5(4,9) A6(5,8) A7(3,4) Let, M1 = A1(2,8) M2 = A5(4,9) M3 = A7(3,4) Calculation: |X2-X1| + |Y2-Y1| Page-7
  • 8. Table: Data Points K1 M1= A1(2,8) K2 M2 = A5(4,9) K3 M3 = A7(3,4) New Cluster A1(2,8) 0 3 7 1 A2(6,9) 5 2 8 2 A3(4,8) 2 1 5 2 A4(8,4) 10 9 5 3 A5(4,9) 3 0 6 2 A6(5,8) 3 2 6 2 A7(3,4) 5 6 0 3 Page-8
  • 9. Table-2: Data Points K1 M1= A1(2,8) K2 M2 = A5(4,8) K3 M3 = A7(5,4) New Cluster A1(2,8) 0 2 7 1 A2(6,9) 5 3 6 2 A3(4,8) 2 0 5 2 A4(8,4) 10 8 3 3 A5(4,9) 3 1 6 2 A6(5,8) 3 1 4 2 A7(3,4) 5 5 1 3 Page-9
  • 10. Initialization with k-means++ 1. Choose first cluster center uniformly at random from data points. 2. For each obs x, compute distance d(x) to nearest cluster center 3. Choose new cluster center from amongst data points, with probability of X being chosen proportional to d(X)2 4. Repeat steps 2 and 3 until k centers have been chosen. Page-10
  • 11. K- means++ Visualized Figure: Data points Page-11
  • 12. Thank you for being with me up to now. Page-12

Editor's Notes

  • #2: Are your classroom colors different than what you see in this template? That’s OK! Click on Design -> Variants (the down arrow) -> Pick the color scheme that works for you! Feel free to change any “You will…” and “I will…” statements to ensure they align with your classroom procedures and rules!