MeLOn
melon::SupportVectorMachineOneClass< T > Class Template Reference

Class defining support vector machine for one class classification to be used in the MAiNGO solver. More...

#include <svm.h>

Inheritance diagram for melon::SupportVectorMachineOneClass< T >:
melon::SupportVectorMachine< T > melon::MelonModel< T >

Private Member Functions

_decision_function (std::vector< T > input) override
 Decision function for one class support vector machine. More...
 

Additional Inherited Members

- Public Member Functions inherited from melon::SupportVectorMachine< T >
 SupportVectorMachine ()
 Default Constructor. More...
 
 SupportVectorMachine (std::string modelName)
 Constructor. More...
 
 SupportVectorMachine (std::string modelPath, std::string modelName)
 Constructor. More...
 
 SupportVectorMachine (std::shared_ptr< const SvmData > modelData)
 Constructor. More...
 
void get_fullspace_variables (size_t &variableNumber, std::vector< std::string > &variableNames, std::vector< std::pair< double, double >> &variableBounds)
 Creates variables for the full space formulation in MAiNGO. More...
 
calculate_prediction_full_space (std::vector< T > input, std::vector< T > internalVariables, std::vector< T > &constraints)
 Calculates prediction based on inputs and set constraints for fullspace formulation. More...
 
calculate_prediction_reduced_space (std::vector< T > input)
 Calculates prediction based on inputs in reduced space. More...
 
size_t get_number_of_full_space_variables ()
 Calculates the number of full space variables. More...
 
- Public Member Functions inherited from melon::MelonModel< T >
virtual ~MelonModel ()=default
 Default destructor. More...
 
void load_model (std::string modelName, MODEL_FILE_TYPE fileType)
 Loads new model from file. More...
 
void load_model (std::string modelPath, std::string modelName, MODEL_FILE_TYPE fileType)
 Loads new model from file. More...
 
void load_model (std::shared_ptr< const ModelData > modelData)
 Loads new model from file. More...
 
- Protected Member Functions inherited from melon::SupportVectorMachine< T >
void _set_data_object (std::shared_ptr< const ModelData > modelData) override
 Sets data object containing model parameters. More...
 
_calculate_prediction (std::vector< T > input, std::vector< T > internalVariables, const bool fullSpace, std::vector< T > &constraints)
 Calculates prediction. More...
 
void _update_kernel ()
 Loads kernel according to loaded internal parameters. More...
 
- Protected Member Functions inherited from melon::MelonModel< T >
 MelonModel (std::shared_ptr< ModelParserFactory > parserFactory)
 Constructor. More...
 
template<typename RandomAccessIterator >
void _set_constraints (std::vector< T > &constraints, std::vector< T > &constraintEvaluation, RandomAccessIterator &constraintValue)
 Sets constraints required for fullspace opimization. More...
 
template<typename RandomAccessIterator >
void _set_constraints (std::vector< T > &constraints, T &constraintEvaluation, RandomAccessIterator &constraintValue)
 Sets constraints required for fullspace opimization. More...
 
- Protected Attributes inherited from melon::SupportVectorMachine< T >
std::shared_ptr< const SvmData_data
 
std::unique_ptr< kernel::StationaryKernel< double, T > > _kernel
 
std::unique_ptr< Scaler< T > > _inputScaler
 
std::unique_ptr< Scaler< T > > _outputScaler
 
- Protected Attributes inherited from melon::MelonModel< T >
bool _modelLoaded { false }
 
std::shared_ptr< ModelParserFactory_parserFactory
 

Detailed Description

template<typename T>
class melon::SupportVectorMachineOneClass< T >

Class defining support vector machine for one class classification to be used in the MAiNGO solver.

Member Function Documentation

◆ _decision_function()

template<typename T >
T melon::SupportVectorMachineOneClass< T >::_decision_function ( std::vector< T >  input)
overrideprivatevirtual

Decision function for one class support vector machine.

Parameters
[in]inputis a vector containing the kernel evaluations for the the support vectors with the input.
Returns
returns the result of the decision function

Implements melon::SupportVectorMachine< T >.


The documentation for this class was generated from the following file: