<p>Hi there,</p>

<p>Thanks for the contribution!  I've merged it in, which will help reduce general sadness (to me, this seems like a good thing).</p>

<p>I also made a slight change: the way <code>MaxVarianceNewCluster</code> works is that it will find the cluster with maximum variance and pull points from it to use as the centroids of empty clusters.  But it does this by precalculating (once each iteration) which cluster has maximum variance.  However, the situation you've stumbled upon can only happen if <code>EmptyCluster()</code> is called enough times that every point is taken out of the maximum cluster.  Therefore, I've modified things slightly in <a href="https://github.com/mlpack/mlpack/commit/ec8a15165b12c246df58cb5e66afe1c6d865ce07" class="commit-link"><tt>ec8a151</tt></a> so that a new cluster with maximum variance is found if the maximum variance cluster has only one point in it.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/481#issuecomment-158932967">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFBxDBu_qyYCTy1LpzIxBo8EwnmDxks5pIwuDgaJpZM4GnIi6.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/481#issuecomment-158932967"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>