Merge pull request #2006 from rcurtin/dt-test-fix

Fix `DecisionTreeTest/PerfectTrainingSet`
This commit is contained in:
favre49
2019-09-11 19:15:26 +05:30
committed by GitHub
+2 -2
View File
@@ -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);