From 7ade459e7474f7a5e8f9df694a6f15f97e6a2ad4 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Fri, 6 Sep 2019 15:59:09 -0400 Subject: [PATCH] Fix strange bug. How did that get there? --- src/mlpack/tests/decision_tree_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mlpack/tests/decision_tree_test.cpp b/src/mlpack/tests/decision_tree_test.cpp index 334fa745a9..0ab7fe6648 100644 --- a/src/mlpack/tests/decision_tree_test.cpp +++ b/src/mlpack/tests/decision_tree_test.cpp @@ -553,7 +553,7 @@ BOOST_AUTO_TEST_CASE(PerfectTrainingSet) BOOST_REQUIRE_EQUAL(prediction, labels[i]); BOOST_REQUIRE_EQUAL(probabilities.n_elem, 2); - for (size_t j = 0; j < 3; ++j) + for (size_t j = 0; j < 2; ++j) { if (labels[i] == j) BOOST_REQUIRE_CLOSE(probabilities[j], 1.0, 1e-5); @@ -596,7 +596,7 @@ BOOST_AUTO_TEST_CASE(PerfectTrainingSetWithWeight) BOOST_REQUIRE_EQUAL(prediction, labels[i]); BOOST_REQUIRE_EQUAL(probabilities.n_elem, 2); - for (size_t j = 0; j < 3; ++j) + for (size_t j = 0; j < 2; ++j) { if (labels[i] == j) BOOST_REQUIRE_CLOSE(probabilities[j], 1.0, 1e-5);