[mlpack-git] master: Oops, I fixed this backwards. The actual error is the output. (84edc09)

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


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

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

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

commit 84edc09b8f75c7c695e334c2947a5bc38e5888f0
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Aug 6 15:01:45 2014 +0000

    Oops, I fixed this backwards.  The actual error is the output.


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

84edc09b8f75c7c695e334c2947a5bc38e5888f0
 src/mlpack/methods/naive_bayes/nbc_main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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



More information about the mlpack-git mailing list