Fix SamplingsTest

This commit is contained in:
Yashwant
2019-06-20 17:35:58 +05:30
parent 2fd5a7fd68
commit 7ed45b7909
+10 -5
View File
@@ -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();