I have a question about interpretation of empty clusters in gap statistic.

Suppose that KMeans is used as clustering algorithm and, for some values k, one or more of the clusters provided by the K-Means are empty.

How can I deal with this situation? What should be the correct value of the Gap for those k?


  • $\begingroup$ To add Anony-Mousse's nice answer. 1) There have been several good theads here on "empty cluster in k-means", - search to read them. 2) Different K-means implementations provide different or several methods to solve when the empty cluser situation has occured. 3) If you end up with an unresolved empty cluster ignore it as nonexistent in subsequent analysis. $\endgroup$ – ttnphns May 10 '18 at 9:59
  • $\begingroup$ Thanks for the answer. I know that several techniques exist to handle empty clusters in k-means; however, this was not the focus of the question. I'm actually interested in how to manage these situations in the context of gap statistic, without compromising the validity of the method. $\endgroup$ – user38320 May 10 '18 at 14:03
  • $\begingroup$ the empty cluster does not exist, so your solution is a k-1 one $\endgroup$ – ttnphns May 11 '18 at 6:06

First of all, if empty clusters arise from k-means that is a warning sign. They usually arise from two causes: 1. really really bad starting conditions, such as uniform coordinate generation rather than e.g. uniformly sampling from the input data, 2. inappropriate data for k-means such as binary attributes, duplicates, one-hour encoding, etc. You should closely investigate this.

Apart from that, these clusters have simply disappeared. Treat them as such, so if you have m empty cluster, treat the result as k-m clusters.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.