title: Computation of Distance Matrices for Binary Data in python
body: <p>I am performing a hierarchical clustering analysis in python. My variables are binary so I was wondering how to calculate the binary euclidean distance. According to the literature, it is possible to use this distance metric with this clustering technique.</p>
  
  <p><a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.352.6123&amp;rep=rep1&amp;type=pdf" rel="nofollow noreferrer">Choi, S. S., Cha, S. H., &amp; Tappert, C. C. (2010). A survey of binary similarity and distance measures. Journal of Systemics, Cybernetics and Informatics, 8(1), 43-48.</a></p>
  
  <p>I was using <code>scipy.spatial.distance.pdist(X, metric='euclidean')</code> but this function uses the euclidean distance for non-binary data. </p>
  
  <p>Is there any python library to calculate distance matrices based on the binary euclidean distance metric?</p>