ITK  5.4.0
Insight Toolkit
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::Statistics::MixtureModelComponentBase< TSample > Class Template Referenceabstract

#include <itkMixtureModelComponentBase.h>

Detailed Description

template<typename TSample>
class itk::Statistics::MixtureModelComponentBase< TSample >

base class for distribution modules 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 and their associated weights.

This class can be considered as a macro class that encapsulates the storage for the weights, 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, GaussianMixtureModelComponent 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
ExpectationMaximizationMixtureModelEstimator

Definition at line 57 of file itkMixtureModelComponentBase.h.

+ Inheritance diagram for itk::Statistics::MixtureModelComponentBase< TSample >:
+ Collaboration diagram for itk::Statistics::MixtureModelComponentBase< TSample >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using MeasurementVectorSizeType = typename TSample::MeasurementVectorSizeType
 
using MeasurementVectorType = typename TSample::MeasurementVectorType
 
using MembershipFunctionType = MembershipFunctionBase< MeasurementVectorType >
 
using ParametersType = Array< double >
 
using Pointer = SmartPointer< Self >
 
using Self = MixtureModelComponentBase
 
using Superclass = Object
 
using WeightArrayType = Array< double >
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

bool AreParametersModified ()
 
void AreParametersModified (bool flag)
 
double Evaluate (MeasurementVectorType &measurements)
 
virtual ParametersType GetFullParameters ()
 
MembershipFunctionTypeGetMembershipFunction ()
 
double GetMinimalParametersChange ()
 
const char * GetNameOfClass () const override
 
const TSample * GetSample () const
 
double GetWeight (unsigned int index) const
 
virtual const WeightArrayTypeGetWeights () const
 
void SetMinimalParametersChange (double change)
 
virtual void SetParameters (const ParametersType &parameters)
 
virtual void SetSample (const TSample *sample)
 
void SetWeight (unsigned int index, double value)
 
virtual void Update ()
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Protected Member Functions

virtual void GenerateData ()=0
 
 MixtureModelComponentBase ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void SetMembershipFunction (MembershipFunctionType *function)
 
 ~MixtureModelComponentBase () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- 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 Attributes

MembershipFunctionTypem_MembershipFunction {}
 
double m_MinimalParametersChange {}
 
ParametersType m_Parameters {}
 
bool m_ParametersModified {}
 
const TSample * m_Sample {}
 
WeightArrayType m_Weights {}
 

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 val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ ConstPointer

template<typename TSample >
using itk::Statistics::MixtureModelComponentBase< TSample >::ConstPointer = SmartPointer<const Self>

Definition at line 64 of file itkMixtureModelComponentBase.h.

◆ MeasurementVectorSizeType

template<typename TSample >
using itk::Statistics::MixtureModelComponentBase< TSample >::MeasurementVectorSizeType = typename TSample::MeasurementVectorSizeType

Definition at line 70 of file itkMixtureModelComponentBase.h.

◆ MeasurementVectorType

template<typename TSample >
using itk::Statistics::MixtureModelComponentBase< TSample >::MeasurementVectorType = typename TSample::MeasurementVectorType

Definition at line 69 of file itkMixtureModelComponentBase.h.

◆ MembershipFunctionType

type alias for the MembershipFunctionBase

Definition at line 73 of file itkMixtureModelComponentBase.h.

◆ ParametersType

template<typename TSample >
using itk::Statistics::MixtureModelComponentBase< TSample >::ParametersType = Array<double>

Definition at line 78 of file itkMixtureModelComponentBase.h.

◆ Pointer

template<typename TSample >
using itk::Statistics::MixtureModelComponentBase< TSample >::Pointer = SmartPointer<Self>

Definition at line 63 of file itkMixtureModelComponentBase.h.

◆ Self

template<typename TSample >
using itk::Statistics::MixtureModelComponentBase< TSample >::Self = MixtureModelComponentBase

Standard class type aliases.

Definition at line 61 of file itkMixtureModelComponentBase.h.

◆ Superclass

template<typename TSample >
using itk::Statistics::MixtureModelComponentBase< TSample >::Superclass = Object

Definition at line 62 of file itkMixtureModelComponentBase.h.

◆ WeightArrayType

template<typename TSample >
using itk::Statistics::MixtureModelComponentBase< TSample >::WeightArrayType = Array<double>

type alias of storage for the weights

Definition at line 76 of file itkMixtureModelComponentBase.h.

Constructor & Destructor Documentation

◆ MixtureModelComponentBase()

template<typename TSample >
itk::Statistics::MixtureModelComponentBase< TSample >::MixtureModelComponentBase ( )
protected

◆ ~MixtureModelComponentBase()

template<typename TSample >
itk::Statistics::MixtureModelComponentBase< TSample >::~MixtureModelComponentBase ( )
overrideprotecteddefault

Member Function Documentation

◆ AreParametersModified() [1/2]

template<typename TSample >
bool itk::Statistics::MixtureModelComponentBase< TSample >::AreParametersModified ( )

returns the value of parameter modified tag

◆ AreParametersModified() [2/2]

template<typename TSample >
void itk::Statistics::MixtureModelComponentBase< TSample >::AreParametersModified ( bool  flag)

sets the parameters modified tag. if one or more of the membership function's parameters are changed, then flag should be true

◆ Evaluate()

template<typename TSample >
double itk::Statistics::MixtureModelComponentBase< TSample >::Evaluate ( MeasurementVectorType measurements)

returns the membership score of the "measurements" vector

◆ GenerateData()

template<typename TSample >
virtual void itk::Statistics::MixtureModelComponentBase< TSample >::GenerateData ( )
protectedpure virtual

◆ GetFullParameters()

template<typename TSample >
virtual ParametersType itk::Statistics::MixtureModelComponentBase< TSample >::GetFullParameters ( )
inlinevirtual

Definition at line 111 of file itkMixtureModelComponentBase.h.

◆ GetMembershipFunction()

template<typename TSample >
MembershipFunctionType* itk::Statistics::MixtureModelComponentBase< TSample >::GetMembershipFunction ( )

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

◆ GetMinimalParametersChange()

template<typename TSample >
double itk::Statistics::MixtureModelComponentBase< TSample >::GetMinimalParametersChange ( )
inline

Definition at line 102 of file itkMixtureModelComponentBase.h.

◆ GetNameOfClass()

template<typename TSample >
const char* itk::Statistics::MixtureModelComponentBase< TSample >::GetNameOfClass ( ) const
overridevirtual

Standard Macros

Reimplemented from itk::Object.

◆ GetSample()

template<typename TSample >
const TSample* itk::Statistics::MixtureModelComponentBase< TSample >::GetSample ( ) const

returns the sample pointer

◆ GetWeight()

template<typename TSample >
double itk::Statistics::MixtureModelComponentBase< TSample >::GetWeight ( unsigned int  index) const

returns the index-th weight

◆ GetWeights()

template<typename TSample >
virtual const WeightArrayType& itk::Statistics::MixtureModelComponentBase< TSample >::GetWeights ( ) const
virtual

returns the pointer to the weights array

◆ PrintSelf()

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

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Object.

◆ SetMembershipFunction()

template<typename TSample >
void itk::Statistics::MixtureModelComponentBase< TSample >::SetMembershipFunction ( MembershipFunctionType function)
protected

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

◆ SetMinimalParametersChange()

template<typename TSample >
void itk::Statistics::MixtureModelComponentBase< TSample >::SetMinimalParametersChange ( double  change)
inline

Definition at line 96 of file itkMixtureModelComponentBase.h.

◆ SetParameters()

template<typename TSample >
virtual void itk::Statistics::MixtureModelComponentBase< TSample >::SetParameters ( const ParametersType parameters)
virtual

◆ SetSample()

template<typename TSample >
virtual void itk::Statistics::MixtureModelComponentBase< TSample >::SetSample ( const TSample *  sample)
virtual

stores the sample pointer

Reimplemented in itk::Statistics::GaussianMixtureModelComponent< TSample >.

◆ SetWeight()

template<typename TSample >
void itk::Statistics::MixtureModelComponentBase< TSample >::SetWeight ( unsigned int  index,
double  value 
)

sets the index-th weight with the "value"

◆ Update()

template<typename TSample >
virtual void itk::Statistics::MixtureModelComponentBase< TSample >::Update ( )
virtual

Member Data Documentation

◆ m_MembershipFunction

template<typename TSample >
MembershipFunctionType* itk::Statistics::MixtureModelComponentBase< TSample >::m_MembershipFunction {}
private

SmartPointer to the membership function - usually density function

Definition at line 167 of file itkMixtureModelComponentBase.h.

◆ m_MinimalParametersChange

template<typename TSample >
double itk::Statistics::MixtureModelComponentBase< TSample >::m_MinimalParametersChange {}
private

Definition at line 162 of file itkMixtureModelComponentBase.h.

◆ m_Parameters

template<typename TSample >
ParametersType itk::Statistics::MixtureModelComponentBase< TSample >::m_Parameters {}
private

Definition at line 164 of file itkMixtureModelComponentBase.h.

◆ m_ParametersModified

template<typename TSample >
bool itk::Statistics::MixtureModelComponentBase< TSample >::m_ParametersModified {}
private

indicative flag of membership function's parameter changes

Definition at line 173 of file itkMixtureModelComponentBase.h.

◆ m_Sample

template<typename TSample >
const TSample* itk::Statistics::MixtureModelComponentBase< TSample >::m_Sample {}
private

target sample data pointer

Definition at line 160 of file itkMixtureModelComponentBase.h.

◆ m_Weights

template<typename TSample >
WeightArrayType itk::Statistics::MixtureModelComponentBase< TSample >::m_Weights {}
private

weights array

Definition at line 170 of file itkMixtureModelComponentBase.h.


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