[mlpack] 290/324: Fix incorrect check (how did this happen?).

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:19 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit a9969177529a739fa943018a166a9a2a01fc0276
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Wed Aug 6 14:58:07 2014 +0000

    Fix incorrect check (how did this happen?).
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16974 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list