Clustering, Segmentation, Data Science, Remote Sensing, Satellite.
we repeat all these steps until centroids’ coordinates don’t change anymore. I expressed this condition as this: the difference between average cluster coordinates should be less than 0.001. But you can play around with other numbers here. while abs(new_centroids.mean()-old_centroids.mean())>0.001: