[mlpack] 75/324: Decision Stump test fixed
Barak A. Pearlmutter
barak+git at cs.nuim.ie
Sun Aug 17 08:21:57 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 93754b55487c2d2c246f5f23ad274e145cb96118
Author: saxena.udit <saxena.udit at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date: Tue Jun 24 18:17:55 2014 +0000
Decision Stump test fixed
git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16706 9d5b8971-822b-0410-80eb-d18c1038ef23
---
src/mlpack/tests/decision_stump_test.cpp | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/mlpack/tests/decision_stump_test.cpp b/src/mlpack/tests/decision_stump_test.cpp
index c826295..34970a1 100644
--- a/src/mlpack/tests/decision_stump_test.cpp
+++ b/src/mlpack/tests/decision_stump_test.cpp
@@ -75,7 +75,11 @@ BOOST_AUTO_TEST_CASE(PerfectSplitOnZero)
Row<size_t> predictedLabels(testingData.n_cols);
ds.Classify(testingData, predictedLabels);
- data::Save(output, predictedLabels, true, true);
+ BOOST_CHECK_EQUAL(predictedLabels(0,0),0);
+ BOOST_CHECK_EQUAL(predictedLabels(0,1),1);
+ BOOST_CHECK_EQUAL(predictedLabels(0,2),0);
+ BOOST_CHECK_EQUAL(predictedLabels(0,3),0);
+ BOOST_CHECK_EQUAL(predictedLabels(0,4),1);
}
/**
@@ -103,7 +107,7 @@ BOOST_AUTO_TEST_CASE(BinningTesting)
Row<size_t> predictedLabels(testingData.n_cols);
ds.Classify(testingData, predictedLabels);
- data::Save(output, predictedLabels, true, true);
+ BOOST_CHECK_EQUAL(predictedLabels(0,0),0);
}
/**
@@ -134,7 +138,10 @@ BOOST_AUTO_TEST_CASE(PerfectMultiClassSplit)
Row<size_t> predictedLabels(testingData.n_cols);
ds.Classify(testingData, predictedLabels);
- data::Save(output, predictedLabels, true, true);
+ BOOST_CHECK_EQUAL(predictedLabels(0,0),0);
+ BOOST_CHECK_EQUAL(predictedLabels(0,1),1);
+ BOOST_CHECK_EQUAL(predictedLabels(0,2),2);
+ BOOST_CHECK_EQUAL(predictedLabels(0,3),3);
}
/**
@@ -167,7 +174,14 @@ BOOST_AUTO_TEST_CASE(MultiClassSplit)
Row<size_t> predictedLabels(testingData.n_cols);
ds.Classify(testingData, predictedLabels);
- data::Save(output, predictedLabels, true, true);
+ BOOST_CHECK_EQUAL(predictedLabels(0,0),0);
+ BOOST_CHECK_EQUAL(predictedLabels(0,1),0);
+ BOOST_CHECK_EQUAL(predictedLabels(0,2),0);
+ BOOST_CHECK_EQUAL(predictedLabels(0,3),0);
+ BOOST_CHECK_EQUAL(predictedLabels(0,4),0);
+ BOOST_CHECK_EQUAL(predictedLabels(0,5),1);
+ BOOST_CHECK_EQUAL(predictedLabels(0,6),2);
+ BOOST_CHECK_EQUAL(predictedLabels(0,7),2);
}
BOOST_AUTO_TEST_SUITE_END();
--
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