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/ 13
k-means clustering
Unsupervised Machine Learning
k-means clustering • simplest unsupervised learning algorithm for solving the clustering problem. • used to classify a given data set into a certain number of clusters, say, k clusters. • after plotting of given data points in the data set, we choose k points arbitrarily as the “centres” of the clusters, one for each cluster. • then associate each of the given data points with the nearest centre. • recalculate averages of the data points associated with a centre and replace the centre with the average, and this is done for each of the centres. • repeat the above process until the centres converge to some fixed points. • the data points nearest to the centres form the various clusters in the dataset and each cluster is represented by the associated centre. Algorithm -notations Algorithm Illustration • Use k-means clustering algorithm to divide the following data into two clusters and also compute the representative data points for the clusters.
Data for k-means algorithm example
Scatter diagram of data in Table Illustration 1. In the problem, the required number of clusters is 2 and we take k = 2. 2. We choose two points arbitrarily as the initial cluster centres. 3. Let us choose arbitrarily
4. We compute the distances of the
given data points from the cluster centers. Initial choice of cluster centres and the resulting clusters Illustration Illustration Illustration 5. We compute the distances of the given data points from the new cluster centers. Illustration