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

Classes

struct  LinearSVMTestFixture
 

Macros

#define BINDING_TYPE   BINDING_TYPE_TEST
 

Functions

 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMNoTrainingData", "[LinearSVMMainTest][BindingTests]")
 Ensure that trainingSet are necessarily passed when training.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMOutputDimensionTest", "[LinearSVMMainTest][BindingTests]")
 Checking that that size and dimensionality of prediction is correct.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMCheckLabelsSizeTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that the labels size is checked.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMLabelsRepresentationTest", "[LinearSVMMainTest][BindingTests]")
 Checking two options of specifying labels (extra row in train matrix and extra parameter) and ensuring that predictions are the same.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMModelReuseTest", "[LinearSVMMainTest][BindingTests]")
 Ensure that saved model can be used again.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMCheckDimOfTestData", "[LinearSVMMainTest][BindingTests]")
 Checking for dimensionality of the test data set.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMCheckDimOfTestData2", "[LinearSVMMainTest][BindingTests]")
 Ensuring that test data dimensionality is checked when model is loaded.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMNonNegativeMaxIterationTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that max iteration for optimizers is non negative.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMNonNegativeLambdaTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that lambda for optimizers is non negative.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMNonNegativeNumberOfClassesTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that number of classes for optimizers is non negative.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMNonNegativeToleranceTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that tolerance is non negative.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMNonNegativeDeltaTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that delta is non negative.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMNonNegativeEpochsTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that epochs is non negative.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMZeroNumberOfClassesTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that number classes must not be one.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMOptimizerTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that Optimizer must be correct.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMDiffMaxIterationsTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring changing Maximum number of iterations changes the output model.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMDiffLambdaTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that lambda has some effects on the output.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMDiffDeltaTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that delta has some effects on the output.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMDiffInterceptTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that no_intercept has some effects on the output.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMDiffInterceptTestWithPsgd", "[LinearSVMMainTest][BindingTests]")
 Ensuring that no_intercept has some effects on the output when the optimizer is 'psgd'.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMNonNegativeStepSizeTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that step size for optimizer is non negative.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMDiffEpochsTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that epochs has some effects on the output.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMDiffStepSizeTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that Step size has some effects on the output.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMDiffToleranceTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that tolerance has some effects on the output.
 
 TEST_CASE_METHOD (LinearSVMTestFixture, "LinearSVMDiffOptimizerTest", "[LinearSVMMainTest][BindingTests]")
 Ensuring that lbfgs optimizer converges to a different result than psgd.
 

Detailed Description

Author
Yashwant Singh Parihar

Test mlpackMain() of logistic_regression_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.