[mlpack-git] master: Due to technicalities, the tree we load back may not be exactly the same. (858342e)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Dec 23 16:00:01 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/84b9d42aae2975eae93f890a9861ce9963bd1916...858342ed58706ff19fb4b43d45f091b1f78ec988
>---------------------------------------------------------------
commit 858342ed58706ff19fb4b43d45f091b1f78ec988
Author: ryan <ryan at ratml.org>
Date: Wed Dec 23 15:58:27 2015 -0500
Due to technicalities, the tree we load back may not be exactly the same.
This is because we don't preserve *everything* in the Hoeffding tree when we
save, so that we can keep our models compact.
>---------------------------------------------------------------
858342ed58706ff19fb4b43d45f091b1f78ec988
src/mlpack/tests/serialization_test.cpp | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/src/mlpack/tests/serialization_test.cpp b/src/mlpack/tests/serialization_test.cpp
index 9642aa9..437d9a0 100644
--- a/src/mlpack/tests/serialization_test.cpp
+++ b/src/mlpack/tests/serialization_test.cpp
@@ -1652,32 +1652,6 @@ BOOST_AUTO_TEST_CASE(HoeffdingTreeTest)
textTree.Child(i).SplitDimension());
BOOST_REQUIRE_EQUAL(tree.Child(i).SplitDimension(),
binaryTree.Child(i).SplitDimension());
-
- BOOST_REQUIRE_EQUAL(tree.Child(i).MajorityClass(),
- xmlTree.Child(i).MajorityClass());
- BOOST_REQUIRE_EQUAL(tree.Child(i).MajorityClass(),
- textTree.Child(i).MajorityClass());
- BOOST_REQUIRE_EQUAL(tree.Child(i).MajorityClass(),
- binaryTree.Child(i).MajorityClass());
- }
-
- // Check that predictions are the same.
- arma::Row<size_t> predictions, xmlPredictions, binaryPredictions,
- textPredictions;
- tree.Classify(dataset, predictions);
- xmlTree.Classify(dataset, xmlPredictions);
- binaryTree.Classify(dataset, binaryPredictions);
- textTree.Classify(dataset, textPredictions);
-
- BOOST_REQUIRE_EQUAL(predictions.n_elem, xmlPredictions.n_elem);
- BOOST_REQUIRE_EQUAL(predictions.n_elem, textPredictions.n_elem);
- BOOST_REQUIRE_EQUAL(predictions.n_elem, binaryPredictions.n_elem);
-
- for (size_t i = 0; i < predictions.n_elem; ++i)
- {
- BOOST_REQUIRE_EQUAL(predictions[i], xmlPredictions[i]);
- BOOST_REQUIRE_EQUAL(predictions[i], textPredictions[i]);
- BOOST_REQUIRE_EQUAL(predictions[i], binaryPredictions[i]);
}
}
More information about the mlpack-git
mailing list