ITK
6.0.0
Insight Toolkit
|
#include <itkExpectationMaximizationMixtureModelEstimator.h>
This class generates the parameter estimates for a mixture model using expectation maximization strategy.
The first template argument is the type of the target sample data. This estimator expects one or more mixture model component objects of the classes derived from the MixtureModelComponentBase. The actual component (or module) parameters are updated by each component. Users can think this class as a strategy or a integration point for the EM procedure. The initial proportion (SetInitialProportions), the input sample (SetSample), the mixture model components (AddComponent), and the maximum iteration (SetMaximumIteration) are required. The EM procedure terminates when the current iteration reaches the maximum iteration or the model parameters converge.
Recent API changes: The static const macro to get the length of a measurement vector, MeasurementVectorSize
has been removed to allow the length of a measurement vector to be specified at run time. It is now obtained at run time from the sample set as input. Please use the function GetMeasurementVectorSize() to get the length.
Definition at line 86 of file itkExpectationMaximizationMixtureModelEstimator.h.
Public Member Functions | |
int | AddComponent (ComponentType *component) |
ComponentMembershipFunctionType * | GetComponentMembershipFunction (int componentIndex) const |
int | GetCurrentIteration () |
const ProportionVectorType & | GetInitialProportions () const |
int | GetMaximumIteration () const |
const MembershipFunctionsWeightsArrayObjectType * | GetMembershipFunctionsWeightsArray () const |
unsigned int | GetNumberOfComponents () const |
const MembershipFunctionVectorObjectType * | GetOutput () const |
const ProportionVectorType & | GetProportions () const |
const TSample * | GetSample () const |
TERMINATION_CODE_ENUM | GetTerminationCode () const |
void | SetInitialProportions (ProportionVectorType &proportions) |
void | SetMaximumIteration (int numberOfIterations) |
void | SetSample (const TSample *sample) |
void | Update () |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) 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 |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
const char * | GetNameOfClass () const override |
virtual const TimeStamp & | GetTimeStamp () 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) const |
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 Pointer | CreateAnother () const |
virtual void | Delete () |
virtual const char * | GetNameOfClass () const |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const noexcept |
Protected Member Functions | |
bool | CalculateDensities () |
double | CalculateExpectation () const |
ExpectationMaximizationMixtureModelEstimator () | |
void | GenerateData () |
void | PrintSelf (std::ostream &os, Indent indent) const override |
bool | UpdateComponentParameters () |
bool | UpdateProportions () |
~ExpectationMaximizationMixtureModelEstimator () override=default | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
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 | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Attributes | |
ComponentVectorType | m_ComponentVector {} |
int | m_CurrentIteration { 0 } |
ProportionVectorType | m_InitialProportions {} |
int | m_MaxIteration { 100 } |
MembershipFunctionVectorObjectPointer | m_MembershipFunctionsObject {} |
MembershipFunctionsWeightsArrayPointer | m_MembershipFunctionsWeightArrayObject {} |
ProportionVectorType | m_Proportions {} |
const TSample * | m_Sample {} |
TERMINATION_CODE_ENUM | m_TerminationCode { TERMINATION_CODE_ENUM::NOT_CONVERGED } |
const char * | GetNameOfClass () const override |
static Pointer | New () |
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 {} |
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::ComponentMembershipFunctionType = MembershipFunctionBase<MeasurementVectorType> |
Type of the membership function base class
Definition at line 124 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::ComponentType = MixtureModelComponentBase<TSample> |
Type of the mixture model component base class
Definition at line 118 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::ComponentVectorType = std::vector<ComponentType *> |
Type of the component pointer storage
Definition at line 121 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::ConstPointer = SmartPointer<const Self> |
Definition at line 93 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GaussianMembershipFunctionPointer = typename GaussianMembershipFunctionType::Pointer |
Definition at line 109 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GaussianMembershipFunctionType = GaussianMembershipFunction<MeasurementVectorType> |
Typedef required to generate dataobject decorated output that can be plugged into SampleClassifierFilter
Definition at line 107 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::MeasurementType = typename TSample::MeasurementType |
Definition at line 102 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::MeasurementVectorType = typename TSample::MeasurementVectorType |
Definition at line 103 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::MembershipFunctionPointer = typename MembershipFunctionType::ConstPointer |
Definition at line 112 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::MembershipFunctionsWeightsArrayObjectType = SimpleDataObjectDecorator<ProportionVectorType> |
type alias for decorated array of proportion
Definition at line 150 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::MembershipFunctionsWeightsArrayPointer = typename MembershipFunctionsWeightsArrayObjectType::Pointer |
Definition at line 151 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::MembershipFunctionType = MembershipFunctionBase<MeasurementVectorType> |
Definition at line 111 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::MembershipFunctionVectorObjectPointer = typename MembershipFunctionVectorObjectType::Pointer |
Definition at line 115 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::MembershipFunctionVectorObjectType = SimpleDataObjectDecorator<MembershipFunctionVectorType> |
Definition at line 114 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::MembershipFunctionVectorType = std::vector<MembershipFunctionPointer> |
Definition at line 113 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::Pointer = SmartPointer<Self> |
Definition at line 92 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::ProportionVectorType = Array<double> |
Type of the array of the proportion values
Definition at line 127 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::SampleType = TSample |
TSample template argument related type alias
Definition at line 101 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::Self = ExpectationMaximizationMixtureModelEstimator |
Standard class type alias
Definition at line 90 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::Superclass = Object |
Definition at line 91 of file itkExpectationMaximizationMixtureModelEstimator.h.
using itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::TERMINATION_CODE_ENUM = ExpectationMaximizationMixtureModelEstimatorEnums::TERMINATION_CODE |
Definition at line 186 of file itkExpectationMaximizationMixtureModelEstimator.h.
|
protected |
|
overrideprotecteddefault |
int itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::AddComponent | ( | ComponentType * | component | ) |
Adds a new component (or class).
|
protected |
|
protected |
|
protected |
Starts the estimation process
ComponentMembershipFunctionType * itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GetComponentMembershipFunction | ( | int | componentIndex | ) | const |
Gets the membership function specified by componentIndex argument.
|
inline |
Gets the current iteration.
Definition at line 169 of file itkExpectationMaximizationMixtureModelEstimator.h.
const ProportionVectorType & itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GetInitialProportions | ( | ) | const |
int itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GetMaximumIteration | ( | ) | const |
const MembershipFunctionsWeightsArrayObjectType * itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GetMembershipFunctionsWeightsArray | ( | ) | const |
Get method for data decorated Membership functions weights array
|
overridevirtual |
Reimplemented from itk::Object.
unsigned int itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GetNumberOfComponents | ( | ) | const |
Gets the total number of classes currently plugged in.
const MembershipFunctionVectorObjectType * itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GetOutput | ( | ) | const |
Output Membership function vector containing the membership functions with the final optimized parameters
const ProportionVectorType & itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GetProportions | ( | ) | const |
Gets the result proportion values
const TSample * itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GetSample | ( | ) | const |
Returns the target data
TERMINATION_CODE_ENUM itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::GetTerminationCode | ( | ) | const |
Gets the termination status
|
static |
|
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.
void itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::SetInitialProportions | ( | ProportionVectorType & | proportions | ) |
Set/Gets the initial proportion values. The size of proportion vector should be same as the number of component (or classes)
void itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::SetMaximumIteration | ( | int | numberOfIterations | ) |
Set/Gets the maximum number of iterations. When the optimization process reaches the maximum number of iterations, even if the class parameters aren't converged, the optimization process stops.
void itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::SetSample | ( | const TSample * | sample | ) |
Sets the target data that will be classified by this
void itk::Statistics::ExpectationMaximizationMixtureModelEstimator< TSample >::Update | ( | ) |
Runs the optimization process.
|
protected |
|
protected |
|
private |
Definition at line 237 of file itkExpectationMaximizationMixtureModelEstimator.h.
|
private |
Definition at line 234 of file itkExpectationMaximizationMixtureModelEstimator.h.
|
private |
Definition at line 238 of file itkExpectationMaximizationMixtureModelEstimator.h.
|
private |
Definition at line 233 of file itkExpectationMaximizationMixtureModelEstimator.h.
|
private |
Definition at line 241 of file itkExpectationMaximizationMixtureModelEstimator.h.
|
private |
Definition at line 242 of file itkExpectationMaximizationMixtureModelEstimator.h.
|
private |
Definition at line 239 of file itkExpectationMaximizationMixtureModelEstimator.h.
|
private |
Target data sample pointer
Definition at line 231 of file itkExpectationMaximizationMixtureModelEstimator.h.
|
private |
Definition at line 236 of file itkExpectationMaximizationMixtureModelEstimator.h.