[mlpack] 120/149: Check frobenius norm overall instead of just for one element.
Barak A. Pearlmutter
barak+git at pearlmutter.net
Sat May 2 09:11:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch svn-trunk
in repository mlpack.
commit 350b97b6f765e75ea4a6ccbe298c885e163ba611
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date: Tue Nov 25 16:22:37 2014 +0000
Check frobenius norm overall instead of just for one element.
git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17410 9d5b8971-822b-0410-80eb-d18c1038ef23
---
src/mlpack/tests/svd_batch_test.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/mlpack/tests/svd_batch_test.cpp b/src/mlpack/tests/svd_batch_test.cpp
index 70d9a3a..95db81e 100644
--- a/src/mlpack/tests/svd_batch_test.cpp
+++ b/src/mlpack/tests/svd_batch_test.cpp
@@ -166,10 +166,8 @@ BOOST_AUTO_TEST_CASE(SVDBatchNegativeElementTest)
arma::mat result = m1 * m2;
- // 5% element-wise tolerance.
- for (size_t i = 0; i < 3; i++)
- for (size_t j = 0; j < 3; j++)
- BOOST_REQUIRE_CLOSE(test(i, j), result(i, j), 5.0);
+ // 2% tolerance on the norm.
+ BOOST_REQUIRE_CLOSE(arma::norm(test, "fro"), arma::norm(result, "fro"), 2.0);
}
BOOST_AUTO_TEST_SUITE_END();
--
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