[mlpack-git] master: Use double, not size_t. (b463081)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Mon Dec 7 09:47:51 EST 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/1efafa13b304c7821d858754b0d2dab9a05795a7...c2d22d60c3355e82b45e6596d721c3905351989c

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

commit b4630811eb109798be723062df8b8e65a27c7f63
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Dec 7 03:40:45 2015 +0000

    Use double, not size_t.
    
    This caused training to fail when weights were used (or, maybe not fail, but
    converge to something suboptimal).


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

b4630811eb109798be723062df8b8e65a27c7f63
 src/mlpack/methods/decision_stump/decision_stump_impl.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/methods/decision_stump/decision_stump_impl.hpp b/src/mlpack/methods/decision_stump/decision_stump_impl.hpp
index 7b17ae2..103e6f7 100644
--- a/src/mlpack/methods/decision_stump/decision_stump_impl.hpp
+++ b/src/mlpack/methods/decision_stump/decision_stump_impl.hpp
@@ -451,7 +451,7 @@ double DecisionStump<MatType>::CalculateEntropy(
   double entropy = 0.0;
   size_t j;
 
-  arma::Row<size_t> numElem(classes);
+  arma::rowvec numElem(classes);
   numElem.fill(0);
 
   // Variable to accumulate the weight in this subview_row.



More information about the mlpack-git mailing list