[mlpack] 39/149: Better comments for the PellegMooreKMeans class.

Barak A. Pearlmutter barak+git at pearlmutter.net
Sat May 2 09:11:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit 74e96fc2ca7d4e186f6244da7307490197774cc3
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Sun Oct 12 20:53:26 2014 +0000

    Better comments for the PellegMooreKMeans class.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17247 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/methods/kmeans/pelleg_moore_kmeans.hpp | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/mlpack/methods/kmeans/pelleg_moore_kmeans.hpp b/src/mlpack/methods/kmeans/pelleg_moore_kmeans.hpp
index 7a766f5..ce813b3 100644
--- a/src/mlpack/methods/kmeans/pelleg_moore_kmeans.hpp
+++ b/src/mlpack/methods/kmeans/pelleg_moore_kmeans.hpp
@@ -14,6 +14,25 @@
 namespace mlpack {
 namespace kmeans {
 
+/**
+ * An implementation of Pelleg-Moore's 'blacklist' algorithm for k-means
+ * clustering.  This algorithm builds a kd-tree on the data points and traverses
+ * it in order to determine the closest clusters to each point.
+ *
+ * For more information on the algorithm, see
+ *
+ * @code
+ * @inproceedings{pelleg1999accelerating,
+ *     title={Accelerating exact k-means algorithms with geometric reasoning},
+ *     author={Pelleg, Dan and Moore, Andrew W.},
+ *     booktitle={Proceedings of the Fifth ACM SIGKDD International Conference
+ *       on Knowledge Discovery and Data Mining (KDD '99)},
+ * pages={277--281},
+ * year={1999},
+ * organization={ACM}
+ * }
+ * @endcode
+ */
 template<typename MetricType, typename MatType>
 class PellegMooreKMeans
 {
@@ -40,8 +59,12 @@ class PellegMooreKMeans
                  arma::mat& newCentroids,
                  arma::Col<size_t>& counts);
 
+  //! Return the number of distance calculations.
   size_t DistanceCalculations() const { return distanceCalculations; }
+  //! Modify the number of distance calculations.
+  size_t& DistanceCalculations() { return distanceCalculations; }
 
+  //! Convenience typedef for the tree.
   typedef tree::BinarySpaceTree<bound::HRectBound<2, true>,
       PellegMooreKMeansStatistic, MatType> TreeType;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list