I'm working with 104x42 data set where all variables are (asymmetric) binary (0-1). I've read that Ward's linkage method doesn't work theoretically properly with binary data beaucause it requests Euclidean distance in a space that i presume should be Euclidean. But I also read that it is possible to compute Euclidean distance for binary data. With this distance does it makes sense to cluster with Ward's method? Otherwise, does it make sense with Hamming distance (that is a metric)?


1 Answer 1


I'd assume that just as with k-means, the use of Bergman divergences is appropriate. Ward is not going to fail badly if you put other measures in it - it's just expecting values from squared deviations.

And on binary vectors, Euclidean, squared Euclidean, and Hamming will be trivially equivalent.

What matters is the kind of clusters found. K-means and Ward correspond to modeling clusters with means, and minimal squared deviations from these means. This is fine if squared deviations from an average make sense for your application. Which may, or may not, be the case. Most likely, there are other, more appropriate choices.

  • $\begingroup$ Thank you very much. About what you said about mean, I suppose I can define its notion and derivates for binary data after I put them in a metric space with PCA/MCA/(N)MDS and so i could cluster new points with k-means or ward's method or other methods by using Euclidean distance. Am i right? $\endgroup$
    – perseo
    Commented Sep 9, 2018 at 0:49
  • $\begingroup$ It's not so much the notion (that cannot change, out it isn't the euclidean mean) but rather he semantic of the mean and least-squares optimization must be meaningful for your application. IMHO they make most sense on continuous variables of the exact same scale (e.g., position variables). $\endgroup$ Commented Sep 9, 2018 at 6:04
  • $\begingroup$ So you should show that the optimization problem relates to the problem that you are trying to solve. $\endgroup$ Commented Sep 9, 2018 at 6:04

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.