[mlpack-svn] r17469 - in mlpack/tags/mlpack-1.0.11: . src/mlpack/tests
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Sun Dec 7 14:42:54 EST 2014
Author: rcurtin
Date: Sun Dec 7 14:42:53 2014
New Revision: 17469
Log:
Merge test fixes from r17405-17407.
Modified:
mlpack/tags/mlpack-1.0.11/ (props changed)
mlpack/tags/mlpack-1.0.11/src/mlpack/tests/gmm_test.cpp
mlpack/tags/mlpack-1.0.11/src/mlpack/tests/hmm_test.cpp
mlpack/tags/mlpack-1.0.11/src/mlpack/tests/radical_test.cpp
Modified: mlpack/tags/mlpack-1.0.11/src/mlpack/tests/gmm_test.cpp
==============================================================================
--- mlpack/tags/mlpack-1.0.11/src/mlpack/tests/gmm_test.cpp (original)
+++ mlpack/tags/mlpack-1.0.11/src/mlpack/tests/gmm_test.cpp Sun Dec 7 14:42:53 2014
@@ -446,8 +446,8 @@
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 @@
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 @@
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 @@
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);
}
/**
Modified: mlpack/tags/mlpack-1.0.11/src/mlpack/tests/hmm_test.cpp
==============================================================================
--- mlpack/tags/mlpack-1.0.11/src/mlpack/tests/hmm_test.cpp (original)
+++ mlpack/tags/mlpack-1.0.11/src/mlpack/tests/hmm_test.cpp Sun Dec 7 14:42:53 2014
@@ -386,11 +386,11 @@
// 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 @@
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);
}
}
}
Modified: mlpack/tags/mlpack-1.0.11/src/mlpack/tests/radical_test.cpp
==============================================================================
--- mlpack/tags/mlpack-1.0.11/src/mlpack/tests/radical_test.cpp (original)
+++ mlpack/tags/mlpack-1.0.11/src/mlpack/tests/radical_test.cpp Sun Dec 7 14:42:53 2014
@@ -64,7 +64,7 @@
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-svn
mailing list