mlpack
Classes | Macros | Functions
adaboost_test.cpp File Reference
#include <string>
#include <mlpack/core.hpp>
#include <mlpack/core/util/mlpack_main.hpp>
#include "test_helper.hpp"
#include <mlpack/methods/adaboost/adaboost_main.cpp>
#include "../test_catch_tools.hpp"
#include "../catch.hpp"
Include dependency graph for adaboost_test.cpp:

Classes

struct  AdaBoostTestFixture
 

Macros

#define BINDING_TYPE   BINDING_TYPE_TEST
 

Functions

 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostOutputDimensionTest", "[AdaBoostMainTest][BindingTests]")
 Check that number of output labels and number of input points are equal.
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostProbabilitiesTest", "[AdaBoostMainTest][BindingTests]")
 Check that total number of rows of probabilities matrix is equal to total number of rows of input data and that each column of probabilities matrix sums up to 1.
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostModelReuseTest", "[AdaBoostMainTest][BindingTests]")
 Ensure that saved model can be used again.
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostItrTest", "[AdaBoostMainTest][BindingTests]")
 Test that iterations in adaboost is always non-negative.
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostWithoutLabelTest", "[AdaBoostMainTest][BindingTests]")
 Check that the last dimension of the training set is used as labels when labels are not passed specifically and results are same from both label and without label models.
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostTrainingDataOrModelTest", "[AdaBoostMainTest][BindingTests]")
 Testing that only one of training data or pre-trained model is passed.
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostOutputPredictionsTest", "[AdaBoostMainTest][BindingTests]")
 This test can be removed in mlpack 4.0.0. More...
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostWeakLearnerTest", "[AdaBoostMainTest][BindingTests]")
 Weak learner should be either Decision Stump or Perceptron.
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostDiffWeakLearnerOutputTest", "[AdaBoostMainTest][BindingTests]")
 Different Weak learner should give different outputs.
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostDiffItrTest", "[AdaBoostMainTest][BindingTests]")
 Accuracy increases as Number of Iterations increases. More...
 
 TEST_CASE_METHOD (AdaBoostTestFixture, "AdaBoostDiffTolTest", "[AdaBoostMainTest][BindingTests]")
 Accuracy increases as tolerance decreases. More...
 

Detailed Description

Author
Nikhil Goel

Test mlpackMain() of adaboost_main.cpp.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.

Function Documentation

◆ TEST_CASE_METHOD() [1/3]

TEST_CASE_METHOD ( AdaBoostTestFixture  ,
"AdaBoostOutputPredictionsTest"  ,
""  [AdaBoostMainTest][BindingTests] 
)

This test can be removed in mlpack 4.0.0.

This tests that the output and predictions outputs are the same.

◆ TEST_CASE_METHOD() [2/3]

TEST_CASE_METHOD ( AdaBoostTestFixture  ,
"AdaBoostDiffItrTest"  ,
""  [AdaBoostMainTest][BindingTests] 
)

Accuracy increases as Number of Iterations increases.

(Or converges and remains same)

◆ TEST_CASE_METHOD() [3/3]

TEST_CASE_METHOD ( AdaBoostTestFixture  ,
"AdaBoostDiffTolTest"  ,
""  [AdaBoostMainTest][BindingTests] 
)

Accuracy increases as tolerance decreases.

(Execution Time also increases)