[mlpack-git] master: Remove finalHypothesis. (127a426)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Mon Dec 7 09:47:57 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/1efafa13b304c7821d858754b0d2dab9a05795a7...c2d22d60c3355e82b45e6596d721c3905351989c
>---------------------------------------------------------------
commit 127a426dafb950a7f74cc7c216f2063fd8589ca6
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Dec 7 14:37:44 2015 +0000
Remove finalHypothesis.
>---------------------------------------------------------------
127a426dafb950a7f74cc7c216f2063fd8589ca6
src/mlpack/methods/adaboost/adaboost.hpp | 3 ---
src/mlpack/methods/adaboost/adaboost_impl.hpp | 14 --------------
2 files changed, 17 deletions(-)
diff --git a/src/mlpack/methods/adaboost/adaboost.hpp b/src/mlpack/methods/adaboost/adaboost.hpp
index f538897..ef6bfa6 100644
--- a/src/mlpack/methods/adaboost/adaboost.hpp
+++ b/src/mlpack/methods/adaboost/adaboost.hpp
@@ -94,9 +94,6 @@ class AdaBoost
const size_t iterations = 100,
const double tolerance = 1e-6);
- // Stores the final classification of the labels.
- arma::Row<size_t> finalHypothesis;
-
// Return the value of ztProduct.
double GetztProduct() { return ztProduct; }
diff --git a/src/mlpack/methods/adaboost/adaboost_impl.hpp b/src/mlpack/methods/adaboost/adaboost_impl.hpp
index 612e2a6..3172f06 100644
--- a/src/mlpack/methods/adaboost/adaboost_impl.hpp
+++ b/src/mlpack/methods/adaboost/adaboost_impl.hpp
@@ -175,20 +175,6 @@ void AdaBoost<MatType, WeakLearner>::Train(
// Accumulate the value of zt for the Hamming loss bound.
ztProduct *= zt;
}
-
- // Iterations are over, now build a strong hypothesis from a weighted
- // combination of these weak hypotheses.
- arma::colvec tempSumFinalH;
- arma::uword maxIndex;
-
- for (size_t i = 0;i < sumFinalH.n_cols; i++)
- {
- tempSumFinalH = sumFinalH.unsafe_col(i);
- tempSumFinalH.max(maxIndex);
- finalH(i) = maxIndex;
- }
-
- finalHypothesis = finalH;
}
/**
More information about the mlpack-git
mailing list