From fecb4eb59d10fce32ea0ba6cfc3649b7ea411597 Mon Sep 17 00:00:00 2001 From: Mikolaj Kaczmarek Date: Thu, 27 Aug 2020 22:28:01 +0200 Subject: [PATCH] Removed confusing comments --- src/mlpack/tests/main_tests/pca_test.cpp | 3 ++- src/mlpack/tests/pca_test.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mlpack/tests/main_tests/pca_test.cpp b/src/mlpack/tests/main_tests/pca_test.cpp index 7da6ff3682..29b1536470 100644 --- a/src/mlpack/tests/main_tests/pca_test.cpp +++ b/src/mlpack/tests/main_tests/pca_test.cpp @@ -100,7 +100,8 @@ TEST_CASE_METHOD(PCATestFixture, "PCANoVarRetainTest", "[PCAMainTest]") /** * Check that we can't specify an invalid new dimensionality. */ -TEST_CASE_METHOD(PCATestFixture, "PCATooHighNewDimensionalityTest", "[PCAMainTest]") +TEST_CASE_METHOD(PCATestFixture, "PCATooHighNewDimensionalityTest", + "[PCAMainTest]") { arma::mat x = arma::randu(5, 5); diff --git a/src/mlpack/tests/pca_test.cpp b/src/mlpack/tests/pca_test.cpp index 7e2642fa75..fff63d0024 100644 --- a/src/mlpack/tests/pca_test.cpp +++ b/src/mlpack/tests/pca_test.cpp @@ -325,11 +325,11 @@ TEST_CASE("PCAScalingTest", "[PCATest]") REQUIRE(std::abs(eigvec(2, 1)) == Approx(1.0).epsilon(0.0035)); // The third component should have the same absolute value characteristics as - // the first (plus 20% tolerance). + // the first (plus tolerance). REQUIRE(std::abs(eigvec(0, 0)) == Approx(sqrt(2) / 2).epsilon(0.0035)); REQUIRE(std::abs(eigvec(1, 0)) == Approx(sqrt(2) / 2).epsilon(0.0035)); REQUIRE(eigvec(2, 0) == Approx(0.0).margin(0.1)); // Large tolerance for noise. // The eigenvalues should sum to three. - REQUIRE(accu(eigval) == Approx(3.0).epsilon(0.1)); // 10% tolerance. + REQUIRE(accu(eigval) == Approx(3.0).epsilon(0.001)); }