# K-Means Clustering

Perform a k-means clustering (with 3 clusters) of the one-dimensional set of points $1,1,2,3,4,7,8,8,12,14,16,21,22,24$ and with the inital point $=2$

To start I would select $3$ centroids that are as far away from one another as possible, e.g. $c_{1}=1, c_{2}=8, c_{3}=24$ and then calculate the distance from each point to each centroid. I would then assign each point to the cluster for which it is nearest to the centroid.

However I don't know what the question means by inital point $=2$?

• I don't either know what they mean initial point 2. Initial point could be centroids like you say, which would be 3 values or initial sets which could be indexes or vectors of which of the values belong to each of the three for start. – mathreadler Apr 26 '17 at 10:18
• You need a special rule in the K-means algorithm when one cluster is empty or when two clusters have the same centroid – reuns Apr 26 '17 at 22:00