k-mean clustering · what is k-mean clustering k-mean clustering is an iterative algorithm that...

23
K-MEAN Clustering Dr. Fizar Ahmed

Upload: others

Post on 12-Mar-2021

8 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups

K-MEAN Clustering

Dr. Fizar Ahmed

Page 2: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups

What is k-mean clustering

K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups (clusters) where each data point belongs to only one group.

Page 3: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups

The way kmeans algorithm works is as follows:

● Specify number of clusters K.● Initialize centroids by first shuffling the dataset and then randomly

selecting K data points for the centroids without replacement.● Keep iterating until there is no change to the centroids. i.e

assignment of data points to clusters isn’t changing.● Compute the sum of the squared distance between data points and

all centroids.● Assign each data point to the closest cluster (centroid).● Compute the centroids for the clusters by taking the average of the

all data points that belong to each cluster.

Page 4: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups

Flowchart of k-means clustering algorithm

Page 5: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups

Application of K-MEAN Clustering

Page 6: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 7: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 8: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 9: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 10: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 11: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 12: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 13: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 14: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 15: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 16: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 17: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 18: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 19: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 20: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 21: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 22: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups
Page 23: K-MEAN Clustering · What is k-mean clustering K-mean clustering is an iterative algorithm that tries to partition the dataset into K pre-defined distinct non-overlapping subgroups

Thank you