[mlpack-git] mlpack-1.0.x: Merge test fixes from r17405-17407. (1e09895)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Jan 7 11:57:38 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : mlpack-1.0.x
Link : https://github.com/mlpack/mlpack/compare/0000000000000000000000000000000000000000...904762495c039e345beba14c1142fd719b3bd50e
>---------------------------------------------------------------
commit 1e09895f4e3f035411e15c081003138c01c23a4d
Author: Ryan Curtin <ryan at ratml.org>
Date: Sun Dec 7 19:42:53 2014 +0000
Merge test fixes from r17405-17407.
>---------------------------------------------------------------
1e09895f4e3f035411e15c081003138c01c23a4d
src/mlpack/tests/gmm_test.cpp | 16 ++++++++--------
src/mlpack/tests/hmm_test.cpp | 6 +++---
src/mlpack/tests/radical_test.cpp | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/mlpack/tests/gmm_test.cpp b/src/mlpack/tests/gmm_test.cpp
index 68c5916..778690e 100644
--- a/src/mlpack/tests/gmm_test.cpp
+++ b/src/mlpack/tests/gmm_test.cpp
@@ -446,8 +446,8 @@ BOOST_AUTO_TEST_CASE(GMMTrainEMMultipleGaussiansWithProbability)
for (size_t row = 0; row < 3; row++)
for (size_t col = 0; col < 3; col++)
- BOOST_REQUIRE_SMALL((g.Covariances()[sortedIndices[0]](row, col) -
- d4.Covariance()(row, col)), 0.60); // Big tolerance! Lots of noise.
+ BOOST_REQUIRE_SMALL((g.Component(sortedIndices[0]).Covariance()(row, col)
+ - d4.Covariance()(row, col)), 0.7); // Big tolerance! Lots of noise.
// Second Gaussian (d1).
BOOST_REQUIRE_SMALL(g.Weights()[sortedIndices[1]] - 0.2, 0.1);
@@ -457,8 +457,8 @@ BOOST_AUTO_TEST_CASE(GMMTrainEMMultipleGaussiansWithProbability)
for (size_t row = 0; row < 3; row++)
for (size_t col = 0; col < 3; col++)
- BOOST_REQUIRE_SMALL((g.Covariances()[sortedIndices[1]](row, col) -
- d1.Covariance()(row, col)), 0.55); // Big tolerance! Lots of noise.
+ BOOST_REQUIRE_SMALL((g.Component(sortedIndices[1]).Covariance()(row, col)
+ - d1.Covariance()(row, col)), 0.7); // Big tolerance! Lots of noise.
// Third Gaussian (d2).
BOOST_REQUIRE_SMALL(g.Weights()[sortedIndices[2]] - 0.3, 0.1);
@@ -468,8 +468,8 @@ BOOST_AUTO_TEST_CASE(GMMTrainEMMultipleGaussiansWithProbability)
for (size_t row = 0; row < 3; row++)
for (size_t col = 0; col < 3; col++)
- BOOST_REQUIRE_SMALL((g.Covariances()[sortedIndices[2]](row, col) -
- d2.Covariance()(row, col)), 0.50); // Big tolerance! Lots of noise.
+ BOOST_REQUIRE_SMALL((g.Component(sortedIndices[2]).Covariance()(row, col)
+ - d2.Covariance()(row, col)), 0.7); // Big tolerance! Lots of noise.
// Fourth gaussian (d3).
BOOST_REQUIRE_SMALL(g.Weights()[sortedIndices[3]] - 0.4, 0.1);
@@ -479,8 +479,8 @@ BOOST_AUTO_TEST_CASE(GMMTrainEMMultipleGaussiansWithProbability)
for (size_t row = 0; row < 3; ++row)
for (size_t col = 0; col < 3; ++col)
- BOOST_REQUIRE_SMALL((g.Covariances()[sortedIndices[3]](row, col) -
- d3.Covariance()(row, col)), 0.50);
+ BOOST_REQUIRE_SMALL((g.Component(sortedIndices[3]).Covariance()(row, col)
+ - d3.Covariance()(row, col)), 0.7);
}
/**
diff --git a/src/mlpack/tests/hmm_test.cpp b/src/mlpack/tests/hmm_test.cpp
index 74cfe93..112d086 100644
--- a/src/mlpack/tests/hmm_test.cpp
+++ b/src/mlpack/tests/hmm_test.cpp
@@ -386,11 +386,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++)
{
@@ -400,7 +400,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);
}
}
}
diff --git a/src/mlpack/tests/radical_test.cpp b/src/mlpack/tests/radical_test.cpp
index fc8b427..186b758 100644
--- a/src/mlpack/tests/radical_test.cpp
+++ b/src/mlpack/tests/radical_test.cpp
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(Radical_Test_Radical3D)
valBest += rad.Vasicek(y);
}
- BOOST_REQUIRE_CLOSE(valBest, valEst, 0.2);
+ BOOST_REQUIRE_CLOSE(valBest, valEst, 0.25);
}
BOOST_AUTO_TEST_SUITE_END();
More information about the mlpack-git
mailing list