Add Gmm CLI test

This commit is contained in:
Yashwant
2019-05-19 22:57:38 +05:30
parent f8537979ee
commit 87cb72eee0
2 changed files with 9 additions and 0 deletions
@@ -144,12 +144,18 @@ static void mlpackMain()
"number of Gaussians must be positive");
const int gaussians = CLI::GetParam<int>("gaussians");
RequireParamValue<int>("trials", [](int x) { return x > 0; }, true,
"trials must be greater than 0");
ReportIgnoredParam({{ "diagonal_covariance", true }}, "no_force_positive");
RequireAtLeastOnePassed({ "output_model" }, false, "no model will be saved");
RequireParamValue<double>("noise", [](double x) { return x >= 0.0; }, true,
"variance of noise must be greater than or equal to 0");
RequireParamValue<int>("max_iterations", [](int x) { return x >= 0; }, true,
"max_iterations must be greater than or equal to 0");
arma::mat dataPoints = std::move(CLI::GetParam<arma::mat>("input"));
// Do we need to add noise to the dataset?
+3
View File
@@ -120,6 +120,9 @@ add_executable(mlpack_test
main_tests/det_test.cpp
main_tests/decision_tree_test.cpp
main_tests/decision_stump_test.cpp
main_tests/gmm_generate_test.cpp
main_tests/gmm_probability_test.cpp
main_tests/gmm_train_test.cpp
main_tests/kde_test.cpp
main_tests/linear_regression_test.cpp
main_tests/logistic_regression_test.cpp