[mlpack] 299/324: Add header comments, fix header guard naming to be in line with the rest of the files.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:20 UTC 2014


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

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

commit 59b4995a75f64845a927fc408ba6d3346a6418b7
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Thu Aug 7 15:10:20 2014 +0000

    Add header comments, fix header guard naming to be in line with the rest of the
    files.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16983 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/methods/adaboost/adaboost.hpp      | 45 ++++++++++++++++++---------
 src/mlpack/methods/adaboost/adaboost_impl.hpp |  5 ++-
 2 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/src/mlpack/methods/adaboost/adaboost.hpp b/src/mlpack/methods/adaboost/adaboost.hpp
index b1b64aa..838a61c 100644
--- a/src/mlpack/methods/adaboost/adaboost.hpp
+++ b/src/mlpack/methods/adaboost/adaboost.hpp
@@ -2,30 +2,45 @@
  * @file adaboost.hpp
  * @author Udit Saxena
  *
- * AdaBoost header file
+ * The AdaBoost class.  AdaBoost is a boosting algorithm, meaning that it
+ * combines an ensemble of weak learners to produce a strong learner.  For more
+ * information on AdaBoost, see the following paper:
+ *
+ * @code
+ * @article{schapire1999improved,
+ *   author = {Schapire, Robert E. and Singer, Yoram},
+ *   title = {Improved Boosting Algorithms Using Confidence-rated Predictions},
+ *   journal = {Machine Learning},
+ *   volume = {37},
+ *   number = {3},
+ *   month = dec,
+ *   year = {1999},
+ *   issn = {0885-6125},
+ *   pages = {297--336},
+ * }
+ * @endcode
  */
-
-#ifndef _MLPACK_METHODS_ADABOOST_ADABOOST_HPP
-#define _MLPACK_METHODS_ADABOOST_ADABOOST_HPP
+#ifndef __MLPACK_METHODS_ADABOOST_ADABOOST_HPP
+#define __MLPACK_METHODS_ADABOOST_ADABOOST_HPP
 
 #include <mlpack/core.hpp>
 #include <mlpack/methods/perceptron/perceptron.hpp>
 #include <mlpack/methods/decision_stump/decision_stump.hpp>
- 
+
 namespace mlpack {
 namespace adaboost {
 
-template <typename MatType = arma::mat, typename WeakLearner = 
+template <typename MatType = arma::mat, typename WeakLearner =
           mlpack::perceptron::Perceptron<> >
-class Adaboost 
+class Adaboost
 {
 public:
   /**
    *  Constructor. Currently runs the Adaboost.mh algorithm
-   *  
+   *
    *  @param data Input data
    *  @param labels Corresponding labels
-   *  @param iterations Number of boosting rounds 
+   *  @param iterations Number of boosting rounds
    *  @param tol The tolerance for change in values of rt.
    *  @param other Weak Learner, which has been initialized already
    */
@@ -33,8 +48,8 @@ public:
            int iterations, double tol, const WeakLearner& other);
 
   /**
-   *  This function helps in building a classification Matrix which is of 
-   *  form: 
+   *  This function helps in building a classification Matrix which is of
+   *  form:
    *  -1 if l is not the correct label
    *  1 if l is the correct label
    *
@@ -45,10 +60,10 @@ public:
 
   /**
    *  This function helps in building the Weight Distribution matrix
-   *  which is updated during every iteration. It calculates the 
-   *  "difficulty" in classifying a point by adding the weights for all 
+   *  which is updated during every iteration. It calculates the
+   *  "difficulty" in classifying a point by adding the weights for all
    *  instances, using D.
-   *  
+   *
    *  @param D The 2 Dimensional weight matrix from which the weights are
    *            to be calculated.
    *  @param weights The output weight vector.
@@ -70,4 +85,4 @@ public:
 
 #include "adaboost_impl.hpp"
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/mlpack/methods/adaboost/adaboost_impl.hpp b/src/mlpack/methods/adaboost/adaboost_impl.hpp
index 4a9d3c0..8c51441 100644
--- a/src/mlpack/methods/adaboost/adaboost_impl.hpp
+++ b/src/mlpack/methods/adaboost/adaboost_impl.hpp
@@ -18,9 +18,8 @@
  * }
  * @endcode
  */
-
-#ifndef _MLPACK_METHODS_ADABOOST_ADABOOST_IMPL_HPP
-#define _MLPACK_METHODS_ADABOOST_ADABOOST_IMPL_HPP
+#ifndef __MLPACK_METHODS_ADABOOST_ADABOOST_IMPL_HPP
+#define __MLPACK_METHODS_ADABOOST_ADABOOST_IMPL_HPP
 
 #include "adaboost.hpp"
 

-- 
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