[mlpack-git] master: Initialize dsPrediction to fix failing test and uninitialized memory. (0c3faf2)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Dec 23 12:57:32 EST 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/a263be41587a5769ba4ac3d47b801555f7692731...0c3faf26aab23f6450a51a64932a6ba511d981e7

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

commit 0c3faf26aab23f6450a51a64932a6ba511d981e7
Author: ryan <ryan at ratml.org>
Date:   Wed Dec 23 12:48:59 2015 -0500

    Initialize dsPrediction to fix failing test and uninitialized memory.


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

0c3faf26aab23f6450a51a64932a6ba511d981e7
 src/mlpack/tests/adaboost_test.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mlpack/tests/adaboost_test.cpp b/src/mlpack/tests/adaboost_test.cpp
index 5d31029..004fbf0 100644
--- a/src/mlpack/tests/adaboost_test.cpp
+++ b/src/mlpack/tests/adaboost_test.cpp
@@ -431,6 +431,7 @@ BOOST_AUTO_TEST_CASE(WeakLearnerErrorVertebralColumn_DS)
   arma::Row<size_t> dsPrediction(labels.n_cols);
 
   DecisionStump<> ds(inputData, labels.row(0), numClasses, inpBucketSize);
+  ds.Classify(inputData, dsPrediction);
 
   size_t countWeakLearnerError = 0;
   for (size_t i = 0; i < labels.n_cols; i++)
@@ -520,6 +521,7 @@ BOOST_AUTO_TEST_CASE(WeakLearnerErrorNonLinearSepData_DS)
   arma::Row<size_t> dsPrediction(labels.n_cols);
 
   DecisionStump<> ds(inputData, labels.row(0), numClasses, inpBucketSize);
+  ds.Classify(inputData, dsPrediction);
 
   size_t countWeakLearnerError = 0;
   for (size_t i = 0; i < labels.n_cols; i++)



More information about the mlpack-git mailing list