[mlpack] 22/44: Merge test fixes from r17405-17407.
Barak A. Pearlmutter
barak+git at pearlmutter.net
Mon Feb 15 19:35:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to tag mlpack-1.0.11
in repository mlpack.
commit 7b1492d984b1c98c785c94fde14294f9adc7e0a1
Author: Ryan Curtin <ryan at ratml.org>
Date: Sun Dec 7 19:42:53 2014 +0000
Merge test fixes from r17405-17407.
---
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();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list