[mlpack-git] master: Widen tolerances slightly. Maybe this test scheme isn't the best? (7fdf213)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:04:03 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit 7fdf21336fc171abed6df728784bc3ec9a97775a
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Nov 24 23:07:08 2014 +0000
Widen tolerances slightly. Maybe this test scheme isn't the best?
>---------------------------------------------------------------
7fdf21336fc171abed6df728784bc3ec9a97775a
src/mlpack/tests/hmm_test.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mlpack/tests/hmm_test.cpp b/src/mlpack/tests/hmm_test.cpp
index 26d3b82..c5289e8 100644
--- a/src/mlpack/tests/hmm_test.cpp
+++ b/src/mlpack/tests/hmm_test.cpp
@@ -371,11 +371,11 @@ BOOST_AUTO_TEST_CASE(DiscreteHMMLabeledTrainTest)
// We can't use % tolerance here because percent error increases as the actual
// value gets very small. So, instead, we just ensure that every value is no
- // more than 0.009 away from the actual value.
+ // more than 0.02 away from the actual value.
for (size_t row = 0; row < hmm.Transition().n_rows; row++)
for (size_t col = 0; col < hmm.Transition().n_cols; col++)
BOOST_REQUIRE_SMALL(hmm.Transition()(row, col) - transition(row, col),
- 0.009);
+ 0.02);
for (size_t col = 0; col < hmm.Emission().size(); col++)
{
@@ -385,7 +385,7 @@ BOOST_AUTO_TEST_CASE(DiscreteHMMLabeledTrainTest)
arma::vec obs(1);
obs[0] = row;
BOOST_REQUIRE_SMALL(hmm.Emission()[col].Probability(obs) -
- emission[col].Probability(obs), 0.009);
+ emission[col].Probability(obs), 0.02);
}
}
}
More information about the mlpack-git
mailing list