[mlpack-git] master: Loosen matrix tolerance checks a bit for floating-point errors. (0af5e8c)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Dec 23 19:12:26 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/bcabda77ee982d8c3512a5bf77f72fe10f1c5e09...0af5e8c8d98a42ce82232ceddc37609df7e7920d

>---------------------------------------------------------------

commit 0af5e8c8d98a42ce82232ceddc37609df7e7920d
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Dec 23 17:40:17 2015 -0500

    Loosen matrix tolerance checks a bit for floating-point errors.


>---------------------------------------------------------------

0af5e8c8d98a42ce82232ceddc37609df7e7920d
 src/mlpack/tests/serialization.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mlpack/tests/serialization.cpp b/src/mlpack/tests/serialization.cpp
index b32b730..6454a23 100644
--- a/src/mlpack/tests/serialization.cpp
+++ b/src/mlpack/tests/serialization.cpp
@@ -33,15 +33,15 @@ void CheckMatrices(const arma::mat& x,
     const double val = x[i];
     if (val == 0.0)
     {
-      BOOST_REQUIRE_SMALL(xmlX[i], 1e-8);
-      BOOST_REQUIRE_SMALL(textX[i], 1e-8);
-      BOOST_REQUIRE_SMALL(binaryX[i], 1e-8);
+      BOOST_REQUIRE_SMALL(xmlX[i], 1e-6);
+      BOOST_REQUIRE_SMALL(textX[i], 1e-6);
+      BOOST_REQUIRE_SMALL(binaryX[i], 1e-6);
     }
     else
     {
-      BOOST_REQUIRE_CLOSE(val, xmlX[i], 1e-8);
-      BOOST_REQUIRE_CLOSE(val, textX[i], 1e-8);
-      BOOST_REQUIRE_CLOSE(val, binaryX[i], 1e-8);
+      BOOST_REQUIRE_CLOSE(val, xmlX[i], 1e-6);
+      BOOST_REQUIRE_CLOSE(val, textX[i], 1e-6);
+      BOOST_REQUIRE_CLOSE(val, binaryX[i], 1e-6);
     }
   }
 }



More information about the mlpack-git mailing list