[mlpack-git] master: Initialize size of predicted labels correctly. (c7bde94)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Mon Nov 30 17:24:33 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/10b9d45b806a3e879b0564d78ccb183ebc7051ba...31c557d9cc7e4da57fd8a246085c19e076d12271
>---------------------------------------------------------------
commit c7bde940e9fbd333d82763675e21a5c5958e6d38
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Nov 30 21:45:44 2015 +0000
Initialize size of predicted labels correctly.
>---------------------------------------------------------------
c7bde940e9fbd333d82763675e21a5c5958e6d38
src/mlpack/methods/adaboost/adaboost_impl.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/methods/adaboost/adaboost_impl.hpp b/src/mlpack/methods/adaboost/adaboost_impl.hpp
index 4d2f8fc..0fb65e1 100644
--- a/src/mlpack/methods/adaboost/adaboost_impl.hpp
+++ b/src/mlpack/methods/adaboost/adaboost_impl.hpp
@@ -202,11 +202,11 @@ void AdaBoost<MatType, WeakLearner>::Classify(
const MatType& test,
arma::Row<size_t>& predictedLabels)
{
- arma::Row<size_t> tempPredictedLabels(predictedLabels.n_cols);
+ arma::Row<size_t> tempPredictedLabels(test.n_cols);
arma::mat cMatrix(classes, test.n_cols);
cMatrix.zeros();
- predictedLabels.zeros();
+ predictedLabels.zeros(test.n_cols);
for (size_t i = 0; i < wl.size(); i++)
{
More information about the mlpack-git
mailing list