From 7ed45b7909da8edac05fe649ee8488cbaf268aa8 Mon Sep 17 00:00:00 2001 From: Yashwant Date: Thu, 20 Jun 2019 17:35:58 +0530 Subject: [PATCH] Fix SamplingsTest --- src/mlpack/tests/main_tests/gmm_train_test.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/mlpack/tests/main_tests/gmm_train_test.cpp b/src/mlpack/tests/main_tests/gmm_train_test.cpp index a8a02b32b9..00f2160da1 100644 --- a/src/mlpack/tests/main_tests/gmm_train_test.cpp +++ b/src/mlpack/tests/main_tests/gmm_train_test.cpp @@ -244,8 +244,9 @@ BOOST_AUTO_TEST_CASE(GmmTrainTrialsTest) arma::mat inputData(5, 100, arma::fill::randu); SetInputParam("input", inputData); - SetInputParam("gaussians", (int) 3); + SetInputParam("gaussians", (int) 8); SetInputParam("trials", (int) 1); + SetInputParam("samplings", (int) 50); SetInputParam("max_iterations", (int) 500); size_t seed = std::time(NULL); @@ -260,8 +261,9 @@ BOOST_AUTO_TEST_CASE(GmmTrainTrialsTest) ResetGmmTrainSetting(); SetInputParam("input", std::move(inputData)); - SetInputParam("gaussians", (int) 3); + SetInputParam("gaussians", (int) 8); SetInputParam("max_iterations", (int) 500); + SetInputParam("samplings", (int) 50); SetInputParam("trials", (int) 500); mlpack::math::randGen.seed((uint32_t) seed); @@ -340,8 +342,9 @@ BOOST_AUTO_TEST_CASE(GmmTrainSamplingsTest) BOOST_FAIL("Unable to load train dataset data_3d_mixed.txt!"); SetInputParam("input", inputData); - SetInputParam("gaussians", (int) 3); + SetInputParam("gaussians", (int) 8); SetInputParam("refined_start", true); + SetInputParam("trials", (int) 2); SetInputParam("samplings", (int) 10); size_t seed = std::time(NULL); @@ -356,9 +359,10 @@ BOOST_AUTO_TEST_CASE(GmmTrainSamplingsTest) ResetGmmTrainSetting(); SetInputParam("input", std::move(inputData)); - SetInputParam("gaussians", (int) 3); + SetInputParam("gaussians", (int) 8); SetInputParam("refined_start", true); - SetInputParam("samplings", (int) 25000); + SetInputParam("trials", (int) 2); + SetInputParam("samplings", (int) 5000); mlpack::math::randGen.seed((uint32_t) seed); srand((unsigned int) seed); @@ -485,3 +489,4 @@ BOOST_AUTO_TEST_CASE(GmmTrainDiagCovariance) } BOOST_AUTO_TEST_SUITE_END(); +