OTB  9.0.0
Orfeo Toolbox
Public Types | List of all members
otb::Statistics::ModelComponentBase< TSample > Class Template Reference

#include <otbModelComponentBase.h>

+ Inheritance diagram for otb::Statistics::ModelComponentBase< TSample >:
+ Collaboration diagram for otb::Statistics::ModelComponentBase< TSample >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef ModelComponentBase Self
 
typedef itk::Object Superclass
 
typedef TSample::MeasurementVectorType MeasurementVectorType
 
typedef TSample::MeasurementVectorSizeType MeasurementVectorSizeType
 
typedef itk::Statistics::MembershipFunctionBase< MeasurementVectorTypeMembershipFunctionType
 
typedef itk::Array< double > ParametersType
 
ParametersType m_Parameters
 
MembershipFunctionTypem_PdfFunction
 
MembershipFunctionTypem_CdfFunction
 
int m_SampleModified
 
const TSample * m_Sample
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual void SetSample (const TSample *sample)
 
const TSample * GetSample () const
 
MembershipFunctionTypeGetPdfMembershipFunction ()
 
MembershipFunctionTypeGetCdfMembershipFunction ()
 
void SetCdfMembershipFunction (MembershipFunctionType *function)
 
void SetParameters (const ParametersType &parameters)
 
ParametersType GetParameters ()
 
double Evaluate (MeasurementVectorType &measurements)
 
double Pdf (MeasurementVectorType &measurements)
 
double Cdf (MeasurementVectorType &measurements)
 
virtual void Update ()
 
virtual void ShowParameters (std::ostream &os, itk::Indent indent) const
 
 ModelComponentBase ()
 
 ~ModelComponentBase () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual void GenerateData ()
 
void SetPdfMembershipFunction (MembershipFunctionType *function)
 
int IsSampleModified ()
 
 ModelComponentBase (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TSample>
class otb::Statistics::ModelComponentBase< TSample >

base class for distribution representation that supports analytical way to update the distribution parameters

This class expects that its subclasses (distribution components) should have analytical expressions for updating its parameters using only the measurement vectors.

The difference from MixtureModelComponentBase is that it does not have the knowledge of a mixture. Hence, no weights have to define.

This class can be considered as a macro class that encapsulates the storage for the model (subclasses of MembershipFunctionBase) and model parameter estimators (implementation of analytical expressions).

Subclasses of this class should define their own distribution specific membership function. For example, GaussianModelComponent class defines and creates a GaussianDensityFunction object for that matter. Subclasses should also cast such membership function object to MembershipFunctionBase object. By doing that, users can get pointers to membership functions from different distributional model

See also
FIXME: StochasticExpectationMaximizationMixtureModelEstimator

Definition at line 65 of file otbModelComponentBase.h.

Member Typedef Documentation

◆ ConstPointer

template<class TSample >
typedef itk::SmartPointer<const Self> otb::Statistics::ModelComponentBase< TSample >::ConstPointer

Definition at line 72 of file otbModelComponentBase.h.

◆ MeasurementVectorSizeType

template<class TSample >
typedef TSample::MeasurementVectorSizeType otb::Statistics::ModelComponentBase< TSample >::MeasurementVectorSizeType

typedef for the MembershipFunctionBase

Definition at line 80 of file otbModelComponentBase.h.

◆ MeasurementVectorType

template<class TSample >
typedef TSample::MeasurementVectorType otb::Statistics::ModelComponentBase< TSample >::MeasurementVectorType

typedef for the MembershipFunctionBase

Definition at line 76 of file otbModelComponentBase.h.

◆ MembershipFunctionType

template<class TSample >
typedef itk::Statistics::MembershipFunctionBase<MeasurementVectorType> otb::Statistics::ModelComponentBase< TSample >::MembershipFunctionType

typedef for the MembershipFunctionBase

Definition at line 83 of file otbModelComponentBase.h.

◆ ParametersType

template<class TSample >
typedef itk::Array<double> otb::Statistics::ModelComponentBase< TSample >::ParametersType

typedef for the MembershipFunctionBase

Definition at line 85 of file otbModelComponentBase.h.

◆ Pointer

template<class TSample >
typedef itk::SmartPointer<Self> otb::Statistics::ModelComponentBase< TSample >::Pointer

Definition at line 71 of file otbModelComponentBase.h.

◆ Self

template<class TSample >
typedef ModelComponentBase otb::Statistics::ModelComponentBase< TSample >::Self

Standard class typedefs.

Definition at line 69 of file otbModelComponentBase.h.

◆ Superclass

template<class TSample >
typedef itk::Object otb::Statistics::ModelComponentBase< TSample >::Superclass

Definition at line 70 of file otbModelComponentBase.h.

Constructor & Destructor Documentation

◆ ModelComponentBase() [1/2]

template<class TSample >
otb::Statistics::ModelComponentBase< TSample >::ModelComponentBase
protected

typedef for the MembershipFunctionBase

Definition at line 36 of file otbModelComponentBase.hxx.

◆ ~ModelComponentBase()

template<class TSample >
otb::Statistics::ModelComponentBase< TSample >::~ModelComponentBase ( )
inlineoverrideprotected

typedef for the MembershipFunctionBase

Definition at line 135 of file otbModelComponentBase.h.

◆ ModelComponentBase() [2/2]

template<class TSample >
otb::Statistics::ModelComponentBase< TSample >::ModelComponentBase ( const Self )
privatedelete

typedef for the MembershipFunctionBase

Member Function Documentation

◆ Cdf()

template<class TSample >
double otb::Statistics::ModelComponentBase< TSample >::Cdf ( MeasurementVectorType measurements)
inline

returns the cdf of the "measurements" vector

Definition at line 142 of file otbModelComponentBase.hxx.

◆ CreateAnother()

template<class TSample >
virtual::itk::LightObject::Pointer otb::Statistics::ModelComponentBase< TSample >::CreateAnother ( void  ) const

typedef for the MembershipFunctionBase

◆ Evaluate()

template<class TSample >
double otb::Statistics::ModelComponentBase< TSample >::Evaluate ( MeasurementVectorType measurements)

returns the pdf of the "measurements" vector

◆ GenerateData()

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::GenerateData
protectedvirtual

subclasses should override this function to perform parameter estimation. But it allows switching m_SampleModified when necessary.

Reimplemented in otb::Statistics::GaussianModelComponent< TSample >.

Definition at line 162 of file otbModelComponentBase.hxx.

◆ GetCdfMembershipFunction()

template<class TSample >
ModelComponentBase< TSample >::MembershipFunctionType * otb::Statistics::ModelComponentBase< TSample >::GetCdfMembershipFunction

typedef for the MembershipFunctionBase

Definition at line 130 of file otbModelComponentBase.hxx.

◆ GetNameOfClass()

template<class TSample >
virtual const char* otb::Statistics::ModelComponentBase< TSample >::GetNameOfClass ( ) const
virtual

typedef for the MembershipFunctionBase

Reimplemented in otb::Statistics::GaussianModelComponent< TSample >.

◆ GetParameters()

template<class TSample >
ParametersType otb::Statistics::ModelComponentBase< TSample >::GetParameters ( )
inline

typedef for the MembershipFunctionBase

Definition at line 110 of file otbModelComponentBase.h.

◆ GetPdfMembershipFunction()

template<class TSample >
ModelComponentBase< TSample >::MembershipFunctionType * otb::Statistics::ModelComponentBase< TSample >::GetPdfMembershipFunction

returns the pointer to the membership function object. Subclasses of this class are responsible for creating the actual membership function objects and cast them to MembershipFunctionBase objects

Definition at line 124 of file otbModelComponentBase.hxx.

◆ GetSample()

template<class TSample >
const TSample * otb::Statistics::ModelComponentBase< TSample >::GetSample

returns the sample pointer

Definition at line 99 of file otbModelComponentBase.hxx.

◆ IsSampleModified()

template<class TSample >
int otb::Statistics::ModelComponentBase< TSample >::IsSampleModified
protected

Test on new data

Definition at line 148 of file otbModelComponentBase.hxx.

◆ New()

template<class TSample >
static Pointer otb::Statistics::ModelComponentBase< TSample >::New ( )
static

Standard Macros

◆ operator=()

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::operator= ( const Self )
privatedelete

typedef for the MembershipFunctionBase

◆ Pdf()

template<class TSample >
double otb::Statistics::ModelComponentBase< TSample >::Pdf ( MeasurementVectorType measurements)
inline

typedef for the MembershipFunctionBase

Definition at line 136 of file otbModelComponentBase.hxx.

◆ PrintSelf()

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

typedef for the MembershipFunctionBase

Definition at line 45 of file otbModelComponentBase.hxx.

◆ SetCdfMembershipFunction()

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::SetCdfMembershipFunction ( MembershipFunctionType function)

stores the pointer to the membership function. subclasses use this function to store their membership function object after dynamic creation, when available (the Pdf part is protected as soon as it is considered to be known for all ModelComponent)

Definition at line 118 of file otbModelComponentBase.hxx.

◆ SetParameters()

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::SetParameters ( const ParametersType parameters)

Gets/Sets the parameter(s) required for the component

Definition at line 105 of file otbModelComponentBase.hxx.

◆ SetPdfMembershipFunction()

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::SetPdfMembershipFunction ( MembershipFunctionType function)
protected

stores the pointer to the membership function. subclasses use this function to store their membership function object after dynamic creation, when available

Definition at line 112 of file otbModelComponentBase.hxx.

◆ SetSample()

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::SetSample ( const TSample *  sample)
virtual

stores the sample pointer (does not update the estimation by itself)

Reimplemented in otb::Statistics::GaussianModelComponent< TSample >.

Definition at line 92 of file otbModelComponentBase.hxx.

◆ ShowParameters()

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::ShowParameters ( std::ostream &  os,
itk::Indent  indent 
) const
virtual

Show the parameters in a minimal form in comparison to PrintSelf

Reimplemented in otb::Statistics::GaussianModelComponent< TSample >.

Definition at line 84 of file otbModelComponentBase.hxx.

◆ Update()

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::Update
virtual

Update parameter estimation if necessary (mainly when sample has changed)

Definition at line 154 of file otbModelComponentBase.hxx.

Member Data Documentation

◆ m_CdfFunction

template<class TSample >
MembershipFunctionType* otb::Statistics::ModelComponentBase< TSample >::m_CdfFunction
protected

SmartPointer to the membership function - here cumulative function

Definition at line 164 of file otbModelComponentBase.h.

◆ m_Parameters

template<class TSample >
ParametersType otb::Statistics::ModelComponentBase< TSample >::m_Parameters
protected

Set of parameters necessary for the statistical models

Definition at line 151 of file otbModelComponentBase.h.

◆ m_PdfFunction

template<class TSample >
MembershipFunctionType* otb::Statistics::ModelComponentBase< TSample >::m_PdfFunction
protected

SmartPointer to the membership function - here density function

Definition at line 161 of file otbModelComponentBase.h.

◆ m_Sample

template<class TSample >
const TSample* otb::Statistics::ModelComponentBase< TSample >::m_Sample
private

target sample data pointer

Definition at line 157 of file otbModelComponentBase.h.

◆ m_SampleModified

template<class TSample >
int otb::Statistics::ModelComponentBase< TSample >::m_SampleModified
protected

indicative flag of membership function's parameter changes

Definition at line 167 of file otbModelComponentBase.h.


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