OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::SVMCrossValidationCostFunction< TModel > Class Template Reference

#include <otbSVMCrossValidationCostFunction.h>

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

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
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 Types inherited from itk::SingleValuedCostFunction
typedef SmartPointer< const SelfConstPointer
 
typedef Array
< ParametersValueType
DerivativeType
 
typedef double MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef
Superclass::ParametersValueType 
ParametersValueType
 
typedef SmartPointer< SelfPointer
 
typedef SingleValuedCostFunction Self
 
typedef CostFunction Superclass
 
- Public Types inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
typedef SmartPointer< const SelfConstPointer
 
typedef OptimizerParameters
< TInternalComputationValueType > 
ParametersType
 
typedef
TInternalComputationValueType 
ParametersValueType
 
typedef SmartPointer< SelfPointer
 
typedef CostFunctionTemplate Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
void GetDerivative (const ParametersType &parameters, DerivativeType &derivative) const override
 
unsigned int GetNumberOfParameters (void) const override
 
MeasureType GetValue (const ParametersType &parameters) const override
 
virtual void SetModel (SVMModelType *_arg)
 
 itkGetObjectMacro (Model, SVMModelType)
 
virtual void SetDerivativeStep (ParametersValueType _arg)
 
virtual ParametersValueType GetDerivativeStep ()
 
- Public Member Functions inherited from itk::SingleValuedCostFunction
virtual const char * GetNameOfClass () const
 
virtual void GetValueAndDerivative (const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 SVMCrossValidationCostFunction ()
 
void UpdateParameters (const ParametersType &parameters) const
 
 ~SVMCrossValidationCostFunction () override
 
- Protected Member Functions inherited from itk::SingleValuedCostFunction
 SingleValuedCostFunction ()
 
virtual ~SingleValuedCostFunction ()
 
- Protected Member Functions inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
 CostFunctionTemplate ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual ~CostFunctionTemplate ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Member Functions

void operator= (const Self &)=delete
 
 SVMCrossValidationCostFunction (const Self &)=delete
 

Private Attributes

ParametersValueType m_DerivativeStep
 
SVMModelPointer m_Model
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

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

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

Definition at line 61 of file otbSVMCrossValidationCostFunction.h.

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

Definition at line 74 of file otbSVMCrossValidationCostFunction.h.

Superclass typedefs

Definition at line 71 of file otbSVMCrossValidationCostFunction.h.

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

Definition at line 72 of file otbSVMCrossValidationCostFunction.h.

Definition at line 73 of file otbSVMCrossValidationCostFunction.h.

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

Definition at line 60 of file otbSVMCrossValidationCostFunction.h.

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

Standard class typedefs.

Definition at line 58 of file otbSVMCrossValidationCostFunction.h.

Definition at line 59 of file otbSVMCrossValidationCostFunction.h.

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

Definition at line 68 of file otbSVMCrossValidationCostFunction.h.

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

Type definitions for the SVM Model.

Definition at line 64 of file otbSVMCrossValidationCostFunction.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 31 of file otbSVMCrossValidationCostFunction.hxx.

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

Destructor.

Definition at line 35 of file otbSVMCrossValidationCostFunction.hxx.

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

Member Function Documentation

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

Reimplemented from itk::Object.

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

Implements itk::SingleValuedCostFunction.

Definition at line 64 of file otbSVMCrossValidationCostFunction.hxx.

References itk::Array< TValue >::Fill(), otbMsgDevMacro, itk::Array< TValue >::SetSize(), and itk::Array< TValue >::Size().

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

Set/Get the derivative step

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

Implements itk::CostFunctionTemplate< TInternalComputationValueType >.

Definition at line 93 of file otbSVMCrossValidationCostFunction.hxx.

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

Implements itk::SingleValuedCostFunction.

Definition at line 41 of file otbSVMCrossValidationCostFunction.hxx.

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

Set the model

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

Method for creation through the object factory.

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

Set/Get the derivative step

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

Set the model

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 105 of file otbSVMCrossValidationCostFunction.hxx.

Member Data Documentation

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

Step used to compute the derivatives

Definition at line 113 of file otbSVMCrossValidationCostFunction.h.

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

Pointer to the SVM model to optimize

Definition at line 110 of file otbSVMCrossValidationCostFunction.h.


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