[mlpack-git] master: Make tolerance private; add accessor/mutator. (5bbce1c)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Mon Nov 30 17:24:31 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/10b9d45b806a3e879b0564d78ccb183ebc7051ba...31c557d9cc7e4da57fd8a246085c19e076d12271
>---------------------------------------------------------------
commit 5bbce1c70628ae8f8f9139db31daeb985cea74c7
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Nov 30 21:35:49 2015 +0000
Make tolerance private; add accessor/mutator.
>---------------------------------------------------------------
5bbce1c70628ae8f8f9139db31daeb985cea74c7
src/mlpack/methods/adaboost/adaboost.hpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/methods/adaboost/adaboost.hpp b/src/mlpack/methods/adaboost/adaboost.hpp
index 5ab00d6..0623762 100644
--- a/src/mlpack/methods/adaboost/adaboost.hpp
+++ b/src/mlpack/methods/adaboost/adaboost.hpp
@@ -100,8 +100,10 @@ class AdaBoost
// Return the value of ztProduct.
double GetztProduct() { return ztProduct; }
- // The tolerance for change in rt and when to stop.
- double tolerance;
+ //! Get the tolerance for stopping the optimization during training.
+ double Tolerance() const { return tolerance; }
+ //! Modify the tolerance for stopping the optimization during training.
+ double& Tolerance() { return tolerance; }
/**
* Train AdaBoost on the given dataset. This method takes an initialized
@@ -143,6 +145,8 @@ private:
//! The number of classes in the model.
size_t classes;
+ // The tolerance for change in rt and when to stop.
+ double tolerance;
//! The vector of weak learners.
std::vector<WeakLearner> wl;
More information about the mlpack-git
mailing list