[mlpack-svn] master: Modify tolerances for NMF tests. (22a4b65)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Tue Jan 6 14:21:05 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/6b14d78fc09cb205ffa7a297f5e6310b2ad83e25...9147fd3ee8072669c18422de4ea6fbe8f964b423
>---------------------------------------------------------------
commit 22a4b655cdc1b7dd1adfcdd9eddc255702437403
Author: ryan <ryan at ratml.org>
Date: Mon Jan 5 15:40:14 2015 -0500
Modify tolerances for NMF tests.
Loosen some, tighten some. This should help these tests be a little less
dependent on changes to default values.
>---------------------------------------------------------------
22a4b655cdc1b7dd1adfcdd9eddc255702437403
src/mlpack/tests/nmf_test.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/mlpack/tests/nmf_test.cpp b/src/mlpack/tests/nmf_test.cpp
index 18dae2e..b26ae2f 100644
--- a/src/mlpack/tests/nmf_test.cpp
+++ b/src/mlpack/tests/nmf_test.cpp
@@ -38,9 +38,9 @@ BOOST_AUTO_TEST_CASE(NMFDefaultTest)
mat wh = w * h;
- // Make sure reconstruction error is not too high. 1.5% tolerance.
+ // Make sure reconstruction error is not too high. 5.0% tolerance.
BOOST_REQUIRE_SMALL(arma::norm(v - wh, "fro") / arma::norm(v, "fro"),
- 0.015);
+ 0.05);
}
/**
@@ -78,9 +78,11 @@ BOOST_AUTO_TEST_CASE(NMFRandomDivTest)
mat v = w * h;
size_t r = 12;
+ // Custom tighter tolerance.
+ SimpleResidueTermination srt(1e-8, 10000);
AMF<SimpleResidueTermination,
RandomInitialization,
- NMFMultiplicativeDivergenceUpdate> nmf;
+ NMFMultiplicativeDivergenceUpdate> nmf(srt);
nmf.Apply(v, r, w, h);
mat wh = w * h;
More information about the mlpack-git
mailing list