OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | 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 Self
ConstPointer
 
typedef
TSample::MeasurementVectorSizeType 
MeasurementVectorSizeType
 
typedef
TSample::MeasurementVectorType 
MeasurementVectorType
 
typedef
itk::Statistics::MembershipFunctionBase
< MeasurementVectorType
MembershipFunctionType
 
typedef itk::Array< double > ParametersType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ModelComponentBase Self
 
typedef itk::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

double Cdf (MeasurementVectorType &measurements)
 
const TSample * GetSample () const
 
void SetCdfMembershipFunction (MembershipFunctionType *function)
 
virtual void SetSample (const TSample *sample)
 
virtual void ShowParameters (std::ostream &os, itk::Indent indent) const
 
virtual void Update ()
 
MembershipFunctionTypeGetPdfMembershipFunction ()
 
MembershipFunctionTypeGetCdfMembershipFunction ()
 
void SetParameters (const ParametersType &parameters)
 
ParametersType GetParameters ()
 
double Evaluate (MeasurementVectorType &measurements)
 
double Pdf (MeasurementVectorType &measurements)
 
- 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
 

Protected Member Functions

virtual void GenerateData ()
 
int IsSampleModified ()
 
 ModelComponentBase ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void SetPdfMembershipFunction (MembershipFunctionType *function)
 
 ~ModelComponentBase () override
 
- 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 ()
 

Protected Attributes

MembershipFunctionTypem_CdfFunction
 
ParametersType m_Parameters
 
MembershipFunctionTypem_PdfFunction
 
int m_SampleModified
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Private Member Functions

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

Private Attributes

const TSample * m_Sample
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Additional Inherited Members

- 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 ()
 

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

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

Definition at line 73 of file otbModelComponentBase.h.

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

Definition at line 81 of file otbModelComponentBase.h.

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

Definition at line 77 of file otbModelComponentBase.h.

typedef for the MembershipFunctionBase

Definition at line 85 of file otbModelComponentBase.h.

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

Definition at line 87 of file otbModelComponentBase.h.

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

Definition at line 72 of file otbModelComponentBase.h.

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

Standard class typedefs.

Definition at line 70 of file otbModelComponentBase.h.

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

Definition at line 71 of file otbModelComponentBase.h.

Constructor & Destructor Documentation

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

Definition at line 37 of file otbModelComponentBase.hxx.

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

Definition at line 137 of file otbModelComponentBase.h.

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

Member Function Documentation

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

returns the cdf of the "measurements" vector

Definition at line 164 of file otbModelComponentBase.hxx.

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

Standard Macros

Reimplemented from itk::Object.

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

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

returns the pdf of the "measurements" vector

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::GenerateData ( void  )
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 189 of file otbModelComponentBase.hxx.

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

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 148 of file otbModelComponentBase.hxx.

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

Standard Macros

Reimplemented from itk::Object.

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

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

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

Definition at line 112 of file otbModelComponentBase.h.

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 140 of file otbModelComponentBase.hxx.

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

returns the sample pointer

Definition at line 108 of file otbModelComponentBase.hxx.

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

Test on new data

Definition at line 172 of file otbModelComponentBase.hxx.

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

Standard Macros

template<class TSample >
void otb::Statistics::ModelComponentBase< TSample >::operator= ( const Self )
privatedelete
template<class TSample >
double otb::Statistics::ModelComponentBase< TSample >::Pdf ( MeasurementVectorType measurements)
inline

returns the pdf of the "measurements" vector

Definition at line 156 of file otbModelComponentBase.hxx.

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

Reimplemented from itk::Object.

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

Definition at line 48 of file otbModelComponentBase.hxx.

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 132 of file otbModelComponentBase.hxx.

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

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

Definition at line 116 of file otbModelComponentBase.hxx.

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 124 of file otbModelComponentBase.hxx.

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 99 of file otbModelComponentBase.hxx.

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 89 of file otbModelComponentBase.hxx.

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

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

Definition at line 180 of file otbModelComponentBase.hxx.

Member Data Documentation

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.

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.

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.

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

target sample data pointer

Definition at line 157 of file otbModelComponentBase.h.

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: