[mlpack-git] master: Fix incorrect check (how did this happen?). (f6f56b2)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:56:53 EST 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

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

commit f6f56b2daaca4db44931ba46eadedcaa3a272ae3
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Aug 6 14:58:07 2014 +0000

    Fix incorrect check (how did this happen?).


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

f6f56b2daaca4db44931ba46eadedcaa3a272ae3
 src/mlpack/methods/naive_bayes/nbc_main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/methods/naive_bayes/nbc_main.cpp b/src/mlpack/methods/naive_bayes/nbc_main.cpp
index 0bfa4f9..d11cf03 100644
--- a/src/mlpack/methods/naive_bayes/nbc_main.cpp
+++ b/src/mlpack/methods/naive_bayes/nbc_main.cpp
@@ -81,7 +81,7 @@ int main(int argc, char* argv[])
   mat testingData;
   data::Load(testingDataFilename, testingData, true);
 
-  if (testingData.n_rows != trainingData.n_rows)
+  if (testingData.n_rows != (trainingData.n_rows - 1))
     Log::Fatal << "Test data dimensionality (" << testingData.n_rows << ") "
         << "must be the same as training data (" << trainingData.n_rows - 1
         << ")!" << std::endl;



More information about the mlpack-git mailing list