[mlpack-git] master: Don't ignore distance calculations during cluster-moving calculations. (0f89009)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:01:24 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

>---------------------------------------------------------------

commit 0f89009bdf3e5a632d622c453e0cc4bf17e631b1
Author: Ryan Curtin <ryan at ratml.org>
Date:   Sun Oct 12 21:10:03 2014 +0000

    Don't ignore distance calculations during cluster-moving calculations.


>---------------------------------------------------------------

0f89009bdf3e5a632d622c453e0cc4bf17e631b1
 src/mlpack/methods/kmeans/pelleg_moore_kmeans_impl.hpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mlpack/methods/kmeans/pelleg_moore_kmeans_impl.hpp b/src/mlpack/methods/kmeans/pelleg_moore_kmeans_impl.hpp
index 4a2bf83..4309f01 100644
--- a/src/mlpack/methods/kmeans/pelleg_moore_kmeans_impl.hpp
+++ b/src/mlpack/methods/kmeans/pelleg_moore_kmeans_impl.hpp
@@ -81,6 +81,7 @@ double PellegMooreKMeans<MetricType, MatType>::Iterate(
                                            newCentroids.col(c)), 2.0);
     }
   }
+  distanceCalculations += centroids.n_cols;
 
   return std::sqrt(residual);
 }



More information about the mlpack-git mailing list