<p>Hi there,</p>

<p>I think the MaxVarianceNewCluster template has an error in the computation of the distance between the mean of the maximum variance cluster and a data point (lines 73-74):<br>
    double distance = arma::as_scalar(<br>
          arma::var(data.col(i) - centroids.col(maxVarCluster)));</p>

<p>The distance here is the variance of the difference vectors and not the distance between the vectors. I think it should be<br>
    double distance = metric::SquaredEuclideanDistance::Evaluate(<br>
        data.col(i), centroids.col(maxVarCluster));<br>
instead.</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/issues/469">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFL_iLuA7tBsBW6WPoJCKsttgwxLUks5pEzXNgaJpZM4GgNwb.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/issues/469"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>