[mlpack-git] master: Modify tolerances for NMF tests. (2def5b0)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:10:34 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit 2def5b02f72e87d5b3824339583a2e5e550013fc
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.
>---------------------------------------------------------------
2def5b02f72e87d5b3824339583a2e5e550013fc
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