[mlpack] 07/20: Adjust tolerance to stabilize the SGDSimilarityTest test.
Barak A. Pearlmutter
barak+git at pearlmutter.net
Thu May 25 20:44:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch master
in repository mlpack.
commit a5ea58d43c0e13352ef282ee51f841fc6503a484
Author: Marcus Edel <marcus.edel at fu-berlin.de>
Date: Fri Apr 28 20:40:38 2017 +0200
Adjust tolerance to stabilize the SGDSimilarityTest test.
---
src/mlpack/tests/minibatch_sgd_test.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mlpack/tests/minibatch_sgd_test.cpp b/src/mlpack/tests/minibatch_sgd_test.cpp
index 3e5d451..bece792 100644
--- a/src/mlpack/tests/minibatch_sgd_test.cpp
+++ b/src/mlpack/tests/minibatch_sgd_test.cpp
@@ -38,8 +38,8 @@ BOOST_AUTO_TEST_SUITE(MiniBatchSGDTest);
BOOST_AUTO_TEST_CASE(SGDSimilarityTest)
{
SGDTestFunction f;
- SGD<SGDTestFunction> s(f, 0.0003, 5000000, 1e-9, false);
- MiniBatchSGD<SGDTestFunction> ms(f, 1, 0.0003, 5000000, 1e-9, false);
+ SGD<SGDTestFunction> s(f, 0.0003, 100000, 1e-4, false);
+ MiniBatchSGD<SGDTestFunction> ms(f, 1, 0.0003, 100000, 1e-4, false);
arma::mat sCoord = f.GetInitialPoint();
arma::mat msCoord = f.GetInitialPoint();
@@ -47,10 +47,10 @@ BOOST_AUTO_TEST_CASE(SGDSimilarityTest)
const double sResult = s.Optimize(sCoord);
const double msResult = ms.Optimize(msCoord);
- BOOST_REQUIRE_CLOSE(sResult, msResult, 1e-8);
- BOOST_REQUIRE_CLOSE(sCoord[0], msCoord[0], 1e-8);
- BOOST_REQUIRE_CLOSE(sCoord[1], msCoord[1], 1e-8);
- BOOST_REQUIRE_CLOSE(sCoord[2], msCoord[2], 1e-8);
+ BOOST_REQUIRE_CLOSE(sResult, msResult, 1e-2);
+ BOOST_REQUIRE_CLOSE(sCoord[0], msCoord[0], 1e-2);
+ BOOST_REQUIRE_CLOSE(sCoord[1], msCoord[1], 1e-2);
+ BOOST_REQUIRE_CLOSE(sCoord[2], msCoord[2], 1e-2);
}
/*
--
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