[mlpack-git] master: Adjust to new EmptyClusterAction API. (7011dd8)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Mon Jun 1 11:16:11 EDT 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/803224f64f6b6490c3cb8aafd528b1db069ef2f1...7011dd89f6a9cf8cf7b66e1b42c9147b606551c2

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

commit 7011dd89f6a9cf8cf7b66e1b42c9147b606551c2
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Jun 1 11:15:42 2015 -0400

    Adjust to new EmptyClusterAction API.


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

7011dd89f6a9cf8cf7b66e1b42c9147b606551c2
 src/mlpack/tests/kmeans_test.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mlpack/tests/kmeans_test.cpp b/src/mlpack/tests/kmeans_test.cpp
index 0a1ab1e..3fa4e5b 100644
--- a/src/mlpack/tests/kmeans_test.cpp
+++ b/src/mlpack/tests/kmeans_test.cpp
@@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE(AllowEmptyClusterTest)
   // Make sure the method doesn't modify any points.
   metric::LMetric<2, true> metric;
   BOOST_REQUIRE_EQUAL(AllowEmptyClusters::EmptyCluster(kMeansData, 2, centroids,
-      counts, metric), 0);
+      counts, metric, 0), 0);
 
   // Make sure no assignments were changed.
   for (size_t i = 0; i < assignments.n_elem; i++)
@@ -148,8 +148,9 @@ BOOST_AUTO_TEST_CASE(MaxVarianceNewClusterTest)
   metric::LMetric<2, true> metric;
 
   // This should only change one point.
-  BOOST_REQUIRE_EQUAL(MaxVarianceNewCluster::EmptyCluster(data, 2, centroids,
-      counts, metric), 1);
+  MaxVarianceNewCluster mvnc;
+  BOOST_REQUIRE_EQUAL(mvnc.EmptyCluster(data, 2, centroids, counts, metric, 0),
+      1);
 
   // Add the variance of each point's distance away from the cluster.  I think
   // this is the sensible thing to do.



More information about the mlpack-git mailing list