OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members

#include <otbSVMCrossValidationCostFunction.h>

+ Inheritance diagram for otb::SVMCrossValidationCostFunction< TModel >:
+ Collaboration diagram for otb::SVMCrossValidationCostFunction< TModel >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::MeasureType MeasurementType
 
typedef Superclass::ParametersType ParametersType
 
typedef Superclass::ParametersValueType ParametersValueType
 
typedef itk::SmartPointer< SelfPointer
 
typedef SVMCrossValidationCostFunction Self
 
typedef itk::SingleValuedCostFunction Superclass
 
typedef SVMModelType::Pointer SVMModelPointer
 
typedef TModel SVMModelType
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 

Static Public Member Functions

static Pointer New ()
 
SVMModelPointer m_Model
 
ParametersValueType m_DerivativeStep
 
virtual void SetModel (SVMModelType *_arg)
 
 itkGetObjectMacro (Model, SVMModelType)
 
virtual void SetDerivativeStep (ParametersValueType _arg)
 
virtual ParametersValueType GetDerivativeStep ()
 
MeasureType GetValue (const ParametersType &parameters) const override
 
void GetDerivative (const ParametersType &parameters, DerivativeType &derivative) const override
 
unsigned int GetNumberOfParameters (void) const override
 
 SVMCrossValidationCostFunction ()
 
 ~SVMCrossValidationCostFunction () override
 
void UpdateParameters (const ParametersType &parameters) const
 
 SVMCrossValidationCostFunction (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TModel>
class otb::SVMCrossValidationCostFunction< TModel >

This function returns the cross validation accuracy of a SVM model.

It allows performing parameters selection to maximize the accuracy using ITK optimizers.

Given an input SVM model, the number of parameters depends on the type of kernel:

Please note that this function is only defined on $ R_{+}^{*} $.

The GetDerivative() uses the GetValue() function to compute the partial derivatives. as such, it can be quite intensive.

Definition at line 53 of file otbSVMCrossValidationCostFunction.h.

Member Typedef Documentation

◆ ConstPointer

template<class TModel >
typedef itk::SmartPointer<const Self> otb::SVMCrossValidationCostFunction< TModel >::ConstPointer

Definition at line 60 of file otbSVMCrossValidationCostFunction.h.

◆ DerivativeType

template<class TModel >
typedef Superclass::DerivativeType otb::SVMCrossValidationCostFunction< TModel >::DerivativeType

Definition at line 73 of file otbSVMCrossValidationCostFunction.h.

◆ MeasurementType

template<class TModel >
typedef Superclass::MeasureType otb::SVMCrossValidationCostFunction< TModel >::MeasurementType

Superclass typedefs

Definition at line 70 of file otbSVMCrossValidationCostFunction.h.

◆ ParametersType

template<class TModel >
typedef Superclass::ParametersType otb::SVMCrossValidationCostFunction< TModel >::ParametersType

Definition at line 71 of file otbSVMCrossValidationCostFunction.h.

◆ ParametersValueType

template<class TModel >
typedef Superclass::ParametersValueType otb::SVMCrossValidationCostFunction< TModel >::ParametersValueType

Definition at line 72 of file otbSVMCrossValidationCostFunction.h.

◆ Pointer

template<class TModel >
typedef itk::SmartPointer<Self> otb::SVMCrossValidationCostFunction< TModel >::Pointer

Definition at line 59 of file otbSVMCrossValidationCostFunction.h.

◆ Self

template<class TModel >
typedef SVMCrossValidationCostFunction otb::SVMCrossValidationCostFunction< TModel >::Self

Standard class typedefs.

Definition at line 57 of file otbSVMCrossValidationCostFunction.h.

◆ Superclass

template<class TModel >
typedef itk::SingleValuedCostFunction otb::SVMCrossValidationCostFunction< TModel >::Superclass

Definition at line 58 of file otbSVMCrossValidationCostFunction.h.

◆ SVMModelPointer

template<class TModel >
typedef SVMModelType::Pointer otb::SVMCrossValidationCostFunction< TModel >::SVMModelPointer

Definition at line 67 of file otbSVMCrossValidationCostFunction.h.

◆ SVMModelType

template<class TModel >
typedef TModel otb::SVMCrossValidationCostFunction< TModel >::SVMModelType

Type definitions for the SVM Model.

Definition at line 63 of file otbSVMCrossValidationCostFunction.h.

Constructor & Destructor Documentation

◆ SVMCrossValidationCostFunction() [1/2]

template<class TModel >
otb::SVMCrossValidationCostFunction< TModel >::SVMCrossValidationCostFunction
protected

Constructor.

Definition at line 30 of file otbSVMCrossValidationCostFunction.hxx.

◆ ~SVMCrossValidationCostFunction()

template<class TModel >
otb::SVMCrossValidationCostFunction< TModel >::~SVMCrossValidationCostFunction
overrideprotected

Destructor.

Definition at line 34 of file otbSVMCrossValidationCostFunction.hxx.

◆ SVMCrossValidationCostFunction() [2/2]

template<class TModel >
otb::SVMCrossValidationCostFunction< TModel >::SVMCrossValidationCostFunction ( const Self )
privatedelete

Pointer to the SVM model to optimize

Member Function Documentation

◆ CreateAnother()

template<class TModel >
virtual::itk::LightObject::Pointer otb::SVMCrossValidationCostFunction< TModel >::CreateAnother ( void  ) const

◆ GetDerivative()

template<class TModel >
void otb::SVMCrossValidationCostFunction< TModel >::GetDerivative ( const ParametersType parameters,
DerivativeType derivative 
) const
override
Returns
The accuracy derivative corresponding to the parameters

Definition at line 59 of file otbSVMCrossValidationCostFunction.hxx.

References otbMsgDevMacro.

◆ GetDerivativeStep()

template<class TModel >
virtual ParametersValueType otb::SVMCrossValidationCostFunction< TModel >::GetDerivativeStep ( )
virtual

Pointer to the SVM model to optimize

◆ GetNumberOfParameters()

template<class TModel >
unsigned int otb::SVMCrossValidationCostFunction< TModel >::GetNumberOfParameters ( void  ) const
override
Returns
the number of parameters to optimize

Definition at line 85 of file otbSVMCrossValidationCostFunction.hxx.

◆ GetValue()

template<class TModel >
SVMCrossValidationCostFunction< TModel >::MeasureType otb::SVMCrossValidationCostFunction< TModel >::GetValue ( const ParametersType parameters) const
override
Returns
The accuracy value corresponding the parameters

Definition at line 38 of file otbSVMCrossValidationCostFunction.hxx.

◆ itkGetObjectMacro()

template<class TModel >
otb::SVMCrossValidationCostFunction< TModel >::itkGetObjectMacro ( Model  ,
SVMModelType   
)

Pointer to the SVM model to optimize

◆ New()

template<class TModel >
static Pointer otb::SVMCrossValidationCostFunction< TModel >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TModel >
void otb::SVMCrossValidationCostFunction< TModel >::operator= ( const Self )
privatedelete

Pointer to the SVM model to optimize

◆ SetDerivativeStep()

template<class TModel >
virtual void otb::SVMCrossValidationCostFunction< TModel >::SetDerivativeStep ( ParametersValueType  _arg)
virtual

Set/Get the derivative step

◆ SetModel()

template<class TModel >
virtual void otb::SVMCrossValidationCostFunction< TModel >::SetModel ( SVMModelType _arg)
virtual

Set the model

◆ UpdateParameters()

template<class TModel >
void otb::SVMCrossValidationCostFunction< TModel >::UpdateParameters ( const ParametersType parameters) const
protected

Update svm parameters struct according to the input parameters

Definition at line 95 of file otbSVMCrossValidationCostFunction.hxx.

Member Data Documentation

◆ m_DerivativeStep

template<class TModel >
ParametersValueType otb::SVMCrossValidationCostFunction< TModel >::m_DerivativeStep
private

Step used to compute the derivatives

Definition at line 112 of file otbSVMCrossValidationCostFunction.h.

◆ m_Model

template<class TModel >
SVMModelPointer otb::SVMCrossValidationCostFunction< TModel >::m_Model
private

Pointer to the SVM model to optimize

Definition at line 109 of file otbSVMCrossValidationCostFunction.h.


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