I am preparing a dataset for KMean clusters. But a series of data appears to be bimodal:

enter image description here

My question is:

Can I perform KMeans on a bimodal data? If not, what kind of transformation can I perform to make the distribution more symmetrical?


  • $\begingroup$ I guess you have to project the modalities onto a common feature space $\endgroup$
    – Upendra01
    Dec 31, 2018 at 5:12
  • 1
    $\begingroup$ Isn't the entire point of any clustering procedure to identify multiple modes?? $\endgroup$
    – whuber
    Dec 31, 2018 at 16:57

1 Answer 1


There are no restrictions to MacQueen's classic $K$-means clustering algorithm that require the data to be unimodal. So long as you can provide an initial partition of the items into K clusters (with bimodal data, perhaps $K=2$ initially?), and can calculate the distance between each observation and the centroid for each cluster at each step, you should be able to proceed without any problems.

  • $\begingroup$ I am learning about kmeans, and being told that before input anything into kmeans, the data needs to be 1. log transformed (if it is skewed) 2. normalized. If the data is not skewed but bimodal, then I am not sure what to do. $\endgroup$
    – Cheng
    Jan 1, 2019 at 7:28
  • $\begingroup$ Who is telling you this? Normalization and and standardization can helpful in k-means, but are certainly not required pre-processing steps. If your variables are measured in different scales and you would like to compare them or if they have widely different variances, it's a good idea to normalize/standardize your data first. You may find this answer helpful to help you decide when it's appropriate: stats.stackexchange.com/questions/21222/…. Log transformations can be helpful too at times (continued)... $\endgroup$ Jan 1, 2019 at 19:03
  • 1
    $\begingroup$ You should read ALL the answers here for a really nice explanation of assumptions of k-means and well as when it works well and when it doesn't and how to pre-process the data so that it performs well: stats.stackexchange.com/questions/133656/… $\endgroup$ Jan 1, 2019 at 19:05
  • $\begingroup$ Thanks a lot for the links. I am going to study the links you have provided! $\endgroup$
    – Cheng
    Jan 2, 2019 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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