title: MiniBatchKMeans Parameters
body: <p>I am trying to cluster patches of images with Sklearn's Minibatch K-Means to reproduce the results of <a href="http://www.stanford.edu/~acoates/papers/coatesleeng_aistats_2011.pdf">this paper</a>.  Here is some information on my dataset:</p>
  
  <ul>
  <li>400,000 rows</li>
  <li>108 dimensions</li>
  <li>1600 clusters.</li>
  </ul>
  
  <p>Can I get some guidance on how to set the parameters for Minibatch KMeans?  Currently, the inertia starts to converge but then it suddenly rises again and then the algorithm is terminated:</p>
  
  <pre><code>Minibatch iteration 48/1300:mean batch inertia: 22.392906, ewa inertia: 22.500929 
  Minibatch iteration 49/1300:mean batch inertia: 22.552454, ewa inertia: 22.509173 
  Minibatch iteration 50/1300:mean batch inertia: 22.582834, ewa inertia: 22.520959 
  Minibatch iteration 51/1300:mean batch inertia: 22.448639, ewa inertia: 22.509388 
  Minibatch iteration 52/1300:mean batch inertia: 22.576970, ewa inertia: 22.520201 
  Minibatch iteration 53/1300:mean batch inertia: 22.489388, ewa inertia: 22.515271 
  Minibatch iteration 54/1300:mean batch inertia: 22.465019, ewa inertia: 22.507231 
  Minibatch iteration 55/1300:mean batch inertia: 22.434557, ewa inertia: 22.495603 
  [MiniBatchKMeans] Reassigning 766 cluster centers.
  Minibatch iteration 56/1300:mean batch inertia: 22.513578, ewa inertia: 22.498479 
  [MiniBatchKMeans] Reassigning 767 cluster centers.
  Minibatch iteration 57/1300:mean batch inertia: 26.445686, ewa inertia: 23.130030 
  Minibatch iteration 58/1300:mean batch inertia: 26.419483, ewa inertia: 23.656341 
  Minibatch iteration 59/1300:mean batch inertia: 26.599368, ewa inertia: 24.127225 
  Minibatch iteration 60/1300:mean batch inertia: 26.479168, ewa inertia: 24.503535 
  Minibatch iteration 61/1300:mean batch inertia: 26.249822, ewa inertia: 24.782940 
  Minibatch iteration 62/1300:mean batch inertia: 26.456175, ewa inertia: 25.050657 
  Minibatch iteration 63/1300:mean batch inertia: 26.320527, ewa inertia: 25.253836 
  Minibatch iteration 64/1300:mean batch inertia: 26.336147, ewa inertia: 25.427005 
  </code></pre>
  
  <p>The image patches I produce don't look like what the authors of the paper get.  Can I have some guidance on how to set the parameters for MiniBatchKmeans for better results?  Here are my current parameters:</p>
  
  <pre><code>kmeans = MiniBatchKMeans(n_clusters=self.num_centroids, verbose=True, batch_size=self.num_centroids * 20,compute_labels=False,
  </code></pre>