[mlpack-git] master: Add some comments. (8bfd3fb)

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


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

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

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

commit 8bfd3fba3601fd3856e1c330f63ff10bfe2e2e13
Author: Ryan Curtin <ryan at ratml.org>
Date:   Tue Jul 29 22:06:37 2014 +0000

    Add some comments.


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

8bfd3fba3601fd3856e1c330f63ff10bfe2e2e13
 src/mlpack/methods/kmeans/naive_kmeans.hpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/mlpack/methods/kmeans/naive_kmeans.hpp b/src/mlpack/methods/kmeans/naive_kmeans.hpp
index d0b986a..cf4eda2 100644
--- a/src/mlpack/methods/kmeans/naive_kmeans.hpp
+++ b/src/mlpack/methods/kmeans/naive_kmeans.hpp
@@ -12,10 +12,25 @@
 namespace mlpack {
 namespace kmeans {
 
+/**
+ * This is an implementation of a single iteration of Lloyd's algorithm for
+ * k-means.  If your intention is to run the full k-means algorithm, you are
+ * looking for the mlpack::kmeans::KMeans class instead of this one.  This class
+ * is used by KMeans as the actual implementation of the Lloyd iteration.
+ *
+ * @param MetricType Type of metric used with this implementation.
+ * @param MatType Matrix type (arma::mat or arma::sp_mat).
+ */
 template<typename MetricType, typename MatType>
 class NaiveKMeans
 {
  public:
+  /**
+   * Construct the NaiveKMeans object with the given dataset and metric.
+   *
+   * @param dataset Dataset.
+   * @param metric Instantiated metric.
+   */
   NaiveKMeans(const MatType& dataset, MetricType& metric);
 
   /**



More information about the mlpack-git mailing list