[mlpack-git] master: Make the 'clustering' timer encompass everything. Including the tree building time. (506c405)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 12 16:04:05 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/eddd7167d69b6c88b271ef2e51d1c20e13f1acd8...70342dd8e5c17e0c164cfb8189748671e9c0dd44
>---------------------------------------------------------------
commit 506c405bb8d5e894686bd95b345a4e89d2261b74
Author: Ryan Curtin <ryan at ratml.org>
Date: Wed Feb 4 17:30:12 2015 -0500
Make the 'clustering' timer encompass everything. Including the tree building time.
>---------------------------------------------------------------
506c405bb8d5e894686bd95b345a4e89d2261b74
src/mlpack/methods/kmeans/kmeans_main.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/mlpack/methods/kmeans/kmeans_main.cpp b/src/mlpack/methods/kmeans/kmeans_main.cpp
index 331eea1..c163827 100644
--- a/src/mlpack/methods/kmeans/kmeans_main.cpp
+++ b/src/mlpack/methods/kmeans/kmeans_main.cpp
@@ -219,6 +219,7 @@ void RunKMeans(const InitialPartitionPolicy& ipp)
initialCentroidsFile << "'." << endl;
}
+ Timer::Start("clustering");
KMeans<metric::EuclideanDistance,
InitialPartitionPolicy,
EmptyClusterPolicy,
@@ -228,7 +229,6 @@ void RunKMeans(const InitialPartitionPolicy& ipp)
{
// We need to get the assignments.
arma::Col<size_t> assignments;
- Timer::Start("clustering");
kmeans.Cluster(dataset, clusters, assignments, centroids,
false, initialCentroidGuess);
Timer::Stop("clustering");
@@ -274,7 +274,6 @@ void RunKMeans(const InitialPartitionPolicy& ipp)
else
{
// Just save the centroids.
- Timer::Start("clustering");
kmeans.Cluster(dataset, clusters, centroids, initialCentroidGuess);
Timer::Stop("clustering");
}
More information about the mlpack-git
mailing list