[mlpack-git] master: Count the base cases and scores of the kNN run. (393be90)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 12 16:02:39 EDT 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/eddd7167d69b6c88b271ef2e51d1c20e13f1acd8...70342dd8e5c17e0c164cfb8189748671e9c0dd44

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

commit 393be906757ce466d8006daa16d6c4a87f88370f
Author: Ryan Curtin <ryan at ratml.org>
Date:   Tue Jan 13 16:29:17 2015 -0500

    Count the base cases and scores of the kNN run.


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

393be906757ce466d8006daa16d6c4a87f88370f
 src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp b/src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp
index a9ee6b3..0065a61 100644
--- a/src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp
+++ b/src/mlpack/methods/kmeans/dual_tree_kmeans_impl.hpp
@@ -77,6 +77,9 @@ double DualTreeKMeans<MetricType, MatType, TreeType>::Iterate(
   arma::Mat<size_t> closestClusters; // We don't actually care about these.
   nns.Search(1, closestClusters, interclusterDistances);
 
+  distanceCalculations += nns.BaseCases();
+  distanceCalculations += nns.Scores();
+
   // Now run the dual-tree algorithm.
   typedef DualTreeKMeansRules<MetricType, TreeType> RulesType;
   RulesType rules(dataset, centroids, newCentroids, counts, oldFromNewCentroids,



More information about the mlpack-git mailing list