8.6 K-means clustering

K-means clustering is a hungry algorithm. It will randomly pick up some points at the beginning as the cluster centroids and then keep updating clusters depending on the distance metric.