mixmod  3.2.0
Mixture models for clustering and classification
 All Classes Namespaces Files Functions Variables Enumerations Friends
XEM::BinaryParameter Class Referenceabstract

Base class for XEMBinaryParameter(s) More...

#include <BinaryParameter.h>

Inheritance diagram for XEM::BinaryParameter:
Collaboration diagram for XEM::BinaryParameter:

Public Member Functions

 BinaryParameter ()
 Default constructor.
 
 BinaryParameter (Model *iModel, ModelType *iModelType, int64_t *tabNbModality)
 Constructor.
 
 BinaryParameter (int64_t iNbCluster, int64_t iPbDimension, ModelType *iModelType, int64_t *tabNbModality)
 
 BinaryParameter (const BinaryParameter *iParameter)
 Constructor.
 
virtual ~BinaryParameter ()
 Destructor.
 
virtual bool operator== (const BinaryParameter &param) const
 Comparison operator.
 
virtual void reset ()
 reset to default values
 
ParametercreateParameter (Model *iModel, int64_t i0, int64_t ki0)
 create the same parameter than this but after updating because without xi0
 
int64_t ** getTabCenter () const
 get TabCenter
 
int64_t * getTabNbModality () const
 get _tabNbModality
 
int64_t getTotalNbModality () const
 get total number of modality
 
void getAllPdf (double **tabFik, double *tabProportion) const
 
virtual double getPdf (int64_t iSample, int64_t kCluster) const =0
 Compute probability density. More...
 
virtual long double getLogPdf (int64_t iSample, int64_t kCluster) const =0
 Compute log probability density. More...
 
virtual double getPdf (Sample *x, int64_t kCluster) const =0
 
virtual double getLogLikelihoodOne () const =0
 getlogLikelihoodOne (one cluster)
 
virtual void computeTikUnderflow (int64_t i, double **tabTik)
 compute Tik for xi (i=0 -> _nbSample-1) when underflow
 
void computeTabCenter ()
 Compute table of centers of the samples for each cluster.
 
virtual void computeScatter ()=0
 Compute scatter(s)
 
virtual void computeRandomScatter ()=0
 Compute random scatter(s)
 
virtual void recopyScatter (Parameter *iParam)=0
 recopy scatter from param (used for init : USER)
 
void initUSER (Parameter *iParam)
 init user
 
void updateForInitRANDOMorUSER_PARTITION (Sample **tabSampleForInit, bool *tabClusterToInitialize)
 updateForInitRANDOMorUSER_PARTITION
 
void initForInitRANDOM ()
 initialize attributes before an InitRandom
 
void initForInitUSER_PARTITION (int64_t &nbInitializedCluster, bool *tabNotInitializedCluster, Partition *initPartition)
 
void computeTabCenterInitUSER_PARTITION (int64_t &nbInitializedCluster, bool *tabNotInitializedCluster, Partition *initPartition)
 
void MAPStep ()
 Maximum a posteriori step method.
 
void MStep ()
 Expectation step method. More...
 
void edit ()
 
virtual void editScatter (int64_t k)=0
 editScatter (for debug)
 
void edit (std::ofstream &oFile, bool text=false)
 Edit.
 
virtual void editScatter (std::ofstream &oFile, int64_t k, bool text=false)=0
 editScatter
 
void input (std::ifstream &fi)
 input
 
void input (double *proportions, double **centers, double ***scatters)
 
virtual void inputScatter (std::ifstream &fi)=0
 
virtual void inputScatter (double ***scatters)=0
 
void recopy (Parameter *otherParameter)
 recopie sans faire construction / destruction
 
virtual void createScatter (double ***scatter)=0
 create Scatter from "Binary Parameter Ekjh"
 
virtual double *** scatterToArray () const =0
 
void updateForCV (Model *originalModel, CVBlock &CVBlock)
 
- Public Member Functions inherited from XEM::Parameter
 Parameter ()
 Default constructor.
 
 Parameter (int64_t iNbCluster, int64_t iPbDimension, ModelType *iModelType)
 Constructor.
 
 Parameter (Model *iModel, ModelType *iModelType)
 Constructor.
 
 Parameter (const Parameter *iParameter)
 Constructor ccopy)
 
virtual ~Parameter ()
 Destructor.
 
virtual GaussianParametergetGaussianParameter ()
 
virtual BinaryParametergetBinaryParameter ()
 
virtual bool operator== (const Parameter &param) const
 Comparison operator.
 
virtual Parameterclone () const =0
 Selector. More...
 
void computeTabProportion ()
 
virtual int64_t getFreeParameter () const =0
 Selector. More...
 
int64_t generateRandomIndex (bool *tabIndividualCanBeUsedForInitRandom, double *weight, double totalWeight)
 
double * getTabProportion () const
 get TabProportion
 
int64_t getNbCluster () const
 get nbCluster
 
int64_t getPbDimension () const
 get pbDimension
 
bool getFreeProportion () const
 getFreeProportion
 
ModelgetModel () const
 getModel
 
ModelTypegetModelType () const
 getModelType
 
virtual void setModel (Model *iModel)
 setModel , made it virtual so that composite paramter class can override it.
 
void setModelType (ModelType *iModeltype)
 set modeltype
 
const std::string & getFilename () const
 getFilename
 
void setFilename (const std::string &filename)
 setFilename
 
FormatNumeric::FormatNumericFile getFormat () const
 get Format
 
void setFormat (const FormatNumeric::FormatNumericFile format)
 set FormatNumeric
 

Protected Member Functions

void getTabCenterIfOneCluster (int64_t *tabCenter, double *tabNbSampleInMajorModality, double **tabNbSamplePerModality=NULL) const
 compute TabCenter if there is only One Cluster
 

Detailed Description

Base class for XEMBinaryParameter(s)

Author
F. Langrognet

Member Function Documentation

void XEM::BinaryParameter::computeTabCenterInitUSER_PARTITION ( int64_t &  nbInitializedCluster,
bool *  tabNotInitializedCluster,
Partition initPartition 
)

computeTabCenterInitUSER_PARTITIONoutputs :

  • nbInitializedCluster
  • tabNotInitializedCluster (array of size _nbCluster)

Here is the call graph for this function:

Here is the caller graph for this function:

virtual long double XEM::BinaryParameter::getLogPdf ( int64_t  iSample,
int64_t  kCluster 
) const
pure virtual

Compute log probability density.

Parameters
iSampleProbability for sample iSample
kClusterProbability in class kCluster

Implemented in XEM::BinaryEkjhParameter, XEM::BinaryEjParameter, XEM::BinaryEkParameter, XEM::BinaryEParameter, and XEM::BinaryEkjParameter.

virtual double XEM::BinaryParameter::getPdf ( int64_t  iSample,
int64_t  kCluster 
) const
pure virtual

Compute probability density.

Parameters
iSampleProbability for sample iSample
kClusterProbability in class kCluster

Implements XEM::Parameter.

Implemented in XEM::BinaryEkjhParameter, XEM::BinaryEjParameter, XEM::BinaryEkParameter, XEM::BinaryEParameter, and XEM::BinaryEkjParameter.

virtual double XEM::BinaryParameter::getPdf ( Sample x,
int64_t  kCluster 
) const
pure virtual

Compute normal probability density function for x vector and kCluster th cluster

Implements XEM::Parameter.

Implemented in XEM::BinaryEkjhParameter, XEM::BinaryEjParameter, XEM::BinaryEkParameter, XEM::BinaryEParameter, and XEM::BinaryEkjParameter.

void XEM::BinaryParameter::initForInitUSER_PARTITION ( int64_t &  nbInitializedCluster,
bool *  tabNotInitializedCluster,
Partition initPartition 
)
virtual

initialize attributes for init USER_PARTITION outputs :

  • nbInitializedCluster
  • tabNotInitializedCluster (array of size _nbCluster)

Implements XEM::Parameter.

Here is the call graph for this function:

void XEM::BinaryParameter::MStep ( )
virtual

Expectation step method.

Maximization step method

Implements XEM::Parameter.

Here is the call graph for this function:


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