[mlpack-svn] r15530 - mlpack/trunk/src/mlpack/tests
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Jul 23 01:11:27 EDT 2013
Author: rcurtin
Date: Tue Jul 23 01:11:27 2013
New Revision: 15530
Log:
Adjust tolerances.
Modified:
mlpack/trunk/src/mlpack/tests/gmm_test.cpp
Modified: mlpack/trunk/src/mlpack/tests/gmm_test.cpp
==============================================================================
--- mlpack/trunk/src/mlpack/tests/gmm_test.cpp (original)
+++ mlpack/trunk/src/mlpack/tests/gmm_test.cpp Tue Jul 23 01:11:27 2013
@@ -338,16 +338,16 @@
GMM<> g(1, 2);
g.Estimate(observations, probabilities, 10);
- // Check that it is trained correctly. 7% tolerance because of random error
+ // Check that it is trained correctly. 5% tolerance because of random error
// present in observations.
- BOOST_REQUIRE_CLOSE(g.Means()[0][0], 0.5, 4.0);
- BOOST_REQUIRE_CLOSE(g.Means()[0][1], 1.0, 4.0);
+ BOOST_REQUIRE_CLOSE(g.Means()[0][0], 0.5, 5.0);
+ BOOST_REQUIRE_CLOSE(g.Means()[0][1], 1.0, 5.0);
- // 9% tolerance on the large numbers, 12% on the smaller numbers.
- BOOST_REQUIRE_CLOSE(g.Covariances()[0](0, 0), 1.0, 4.0);
- BOOST_REQUIRE_CLOSE(g.Covariances()[0](0, 1), 0.3, 6.0);
- BOOST_REQUIRE_CLOSE(g.Covariances()[0](1, 0), 0.3, 6.0);
- BOOST_REQUIRE_CLOSE(g.Covariances()[0](1, 1), 1.0, 4.0);
+ // 6% tolerance on the large numbers, 10% on the smaller numbers.
+ BOOST_REQUIRE_CLOSE(g.Covariances()[0](0, 0), 1.0, 6.0);
+ BOOST_REQUIRE_CLOSE(g.Covariances()[0](0, 1), 0.3, 10.0);
+ BOOST_REQUIRE_CLOSE(g.Covariances()[0](1, 0), 0.3, 10.0);
+ BOOST_REQUIRE_CLOSE(g.Covariances()[0](1, 1), 1.0, 6.0);
BOOST_REQUIRE_CLOSE(g.Weights()[0], 1.0, 1e-5);
}
More information about the mlpack-svn
mailing list