Is it possible for centroids to be generated at the same point?



In this exercise, we learned about the first step in K-Means Clustering, which is the placement of k random centroids for the initial clusters. Is it possible for more than one of these centroids to be generated at the same point?


Yes, this is possible due to the nature of randomization, but it is very, very unlikely. In some cases, you may even implement the algorithm so that any taken positions cannot be taken by another centroid.

In the rare chance that this does happen, it will not have too much of a consequence. The entire process of K-Means is usually run multiple times, so on different executions, the centroids will initially be placed at different locations. This is done so that it can choose the most accurate of the tests and reduce error.