title: k-mean clustering - inertia only gets larger
body: <p>I am trying to use the KMeans clustering from <a href="https://github.com/facebookresearch/faiss" rel="nofollow noreferrer">faiss</a> on a human pose dataset of body joints. I have 16 body parts so a dimension of 32. The joints are scaled in a range between 0 and 1. My dataset consists of ~ 900.000 instances. As mentioned by faiss (<a href="https://github.com/facebookresearch/faiss/wiki/FAQ" rel="nofollow noreferrer">faiss_FAQ</a>):</p>
  <blockquote>
  <p>As a rule of thumb there is no consistent improvement of the k-means quantizer beyond 20 iterations and 1000 * k training points</p>
  </blockquote>
  <p>Applying this to my problem I randomly select 50000 instances for training. As I want to check for a number of clusters <em>k</em> between 1 and 30.</p>
  <p>Now to my &quot;problem&quot;:</p>
  <p>The inertia is increasing directly as the number of cluster increases (n_cluster on the x-axis):
  <a href="https://i.stack.imgur.com/BnN34.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BnN34.png" alt="inertia" /></a></p>
  <p>I tried varying the number of iterations, the number of redos, verbose and spherical, but the results stay the same or get worse. I do not think that it is a problem of my implementation; I tested it on a small example with 2D data and very <em>clear</em> clusters and it worked.</p>
  <p>Is it that the data is just bad clustered or is there another problem/mistake I have missed? Maybe the scaling of the values between 0 and 1? Should I try another approach?</p>