K-Means clustering is unsupervised algorithm, which is very intuitive and could be visualized geometrically.
Basically, we are trying to split the data into the k groups or clusters, and each cluster has a center, which is defined by calculating geometrical centroid of the cluster.
Steps of the K-means clustering algorithm:
1) Set k initial centers randomly
2) Calculate 'distances'(e.g., if in 2d space) from the data point to these centers and group the data by the 'closest' distances to these centers
3) Recalculate position of k centers (as a mean of the data in that cluster)
4) repeat steps 2 and 3 until no changes.
Here is the link I used to play and visualize clustering.
Top comments (1)
I also write a blog on K-Means clustering please visit it and provide me your valuable thoughts: - K-Means