I'm wondering how k-means deals with randomly initializing two centers (for two distinct observations x_1
and x_2
, but with the same spatial localization) that are at the same point? I'm planning to cluster a bunch of observations I have, but I would ideally like to keep observations that have the same spatial localization in the same cluster. In the picture the two points at the bottom could have been randomly assigned to be two centers.
I've seen a similar answer asked here: In k-means, can two initial random centeroids be same?, but I'm wondering more how k-means handles situations like this algorithmically.
Some background in sklearn: As I understand it, in python you can initialize your data using a random initialization, whereupon I don't think there is any restraint on different centers being in the same point, and also there is the kmeans++ initialization, where my question does not apply, because kmeans++ finds centers "spread apart".