title: How to do classification in binary data set using scikit-learn?
body: <p>I have the following binary dataset:</p>
  
  <pre><code>[
      [1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1],
      [1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1],
      [1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0],
      [1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0],
      [1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0]
  ]
  </code></pre>
  
  <p>I want to cluster(scatter) this into 3 parts in such a way that the arrays with most similarity(0s and 1s at the same position in array) are clustered in same group.</p>
  
  <p>Since I have learned that binary data cannot be clustered straight away and need the dimensions to be reduced. The <a href="http://scikit-learn.org/stable/modules/manifold.html" rel="nofollow noreferrer">manifold learning algorithms</a> are capable of doing that. I am trying to reduce it to as little as 2 dimensions and then scatter it on a plot to make it more user friendly, Multi-dimensional scaling seems to be the <a href="http://scikit-learn.org/stable/modules/manifold.html#multi-dimensional-scaling-mds" rel="nofollow noreferrer">most promising algorithm</a> for doing this. But when I fit it around my dataset, it still returns the same dataset without any reductions:</p>
  
  <pre><code>mds = MDS(n_components=2, metric=True, n_init=4, max_iter=300, verbose=0, eps=0.001, n_jobs=1, random_state=None, dissimilarity='euclidean')
  mds.fit(X)
  return X
  </code></pre>
  
  <p>Any idea what am I doing wrong or what am I missing? I am trying to reduce this data set to 2 dimensions and then cluster it on a 2d scatter graph such that the the arrays which are similar are grouped together and closely based on the similarity in positions of 0s and 1s.</p>