src/mlpack/tests/main_tests/adaboost_test.cpp
BOOST_AUTO_TEST_CASE(AdaBoostTrainingDataOrModelTest)
{
  arma::mat trainData;
  if (!data::Load("trainSet.csv", trainData))
    BOOST_FAIL("Unable to load train dataset trainSet.csv!");

  SetInputParam("training", std::move(trainData));

  mlpackMain();

  SetInputParam("input_model",
                CLI::GetParam<AdaBoostModel*>("output_model"));

  Log::Fatal.ignoreInput = true;
  BOOST_REQUIRE_THROW(mlpackMain(), std::runtime_error);
  Log::Fatal.ignoreInput = false;
}
/**
 * Testing that only one of training data or pre-trained model is passed.
 */
Testing that only one of training data or pre-trained model is passed.
Testing that only one of training data or pre - trained model is passed .
BOOST_AUTO_TEST_CASE(AdaBoostTrainingDataOrModelTest)
{
  arma::mat trainData;
  if (!data::Load("trainSet.csv", trainData))
    BOOST_FAIL("Unable to load train dataset trainSet.csv!");
  SetInputParam("training", std::move(trainData));
  mlpackMain();
  SetInputParam("input_model",
                CLI::GetParam<AdaBoostModel*>("output_model"));
  Log::Fatal.ignoreInput = true;
  BOOST_REQUIRE_THROW(mlpackMain(), std::runtime_error);
  Log::Fatal.ignoreInput = false;
}
BOOST_AUTO_TEST_CASE ( AdaBoostTrainingDataOrModelTest ) { arma :: mat trainData ; if ( ! data :: Load ( " " , trainData ) ) BOOST_FAIL ( " " ) ; SetInputParam ( " " , std :: move ( trainData ) ) ; mlpackMain ( ) ; SetInputParam ( " " , CLI :: GetParam < AdaBoostModel * > ( " " ) ) ; Log :: Fatal . ignoreInput = true ; BOOST_REQUIRE_THROW ( mlpackMain ( ) , std :: runtime_error ) ; Log :: Fatal . ignoreInput = false ; }
Testing that only one of training data or pre-trained model is passed.
Testing that only one of training data or pre - trained model is passed .