[mlpack-svn] r15296 - mlpack/trunk/src/mlpack/methods/det

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Jun 24 12:44:29 EDT 2013


Author: marcus
Date: 2013-06-24 12:44:29 -0400 (Mon, 24 Jun 2013)
New Revision: 15296

Modified:
   mlpack/trunk/src/mlpack/methods/det/dt_utils.cpp
Log:
Fix index out of bounds error when using det with a labels file.

Modified: mlpack/trunk/src/mlpack/methods/det/dt_utils.cpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/det/dt_utils.cpp	2013-06-24 11:34:49 UTC (rev 15295)
+++ mlpack/trunk/src/mlpack/methods/det/dt_utils.cpp	2013-06-24 16:44:29 UTC (rev 15296)
@@ -19,7 +19,7 @@
   // Tag the leaves with numbers.
   int numLeaves = dtree->TagTree();
 
-  arma::Mat<size_t> table(numLeaves, numClasses);
+  arma::Mat<size_t> table(numLeaves, (numClasses + 1));
   table.zeros();
 
   for (size_t i = 0; i < data.n_cols; i++)




More information about the mlpack-svn mailing list