50 double mWeightInitScale;
51 double mWeightInitRate;
54 int mEMMaximumIterationsNumber;
57 int mEMIterationsNumber;
61 SP::MMSD_DataSet mDataSet;
65 SV::MMSD_Cluster mClusters;
79 double mMinEigenValue;
118 mIsEmptyClusterDeleted=v;
128 return mDataSet.get();
133 return mDataSet.get();
141 mEMMaximumIterationsNumber=n;
148 return mEMMaximumIterationsNumber;
156 return mEMIterationsNumber;
166 return mClusters.getSize();
173 if ((index>=0) && (index<mClusters.getSize()))
return mClusters.get(index);
180 return mSampleClusterProbabilities;
185 return mSampleClusterIndices;
215 mWeightInitType=type;
216 mWeightInitScale=scale;
217 mWeightInitRate=rate;
258 const int& backupSteps);
287 const int& backupSteps) {
305 const int& nDigits,
const int& step) {
353 const int& nClusters);
tBoolean computeLogLikelihood(double &logL)
compute logLikelihood
Definition: MMSD_Model.h:427
virtual void initialize(const MMSD_IntegerVector &clusters, const MMSD_DoubleFullMatrix &properties, const int &nClusters)
initialization INPUT parameters:
Definition: MMSD_Model.cpp:175
void setEMMaximumIterationsNumber(const int &n)
set the maximum iterations number for EM algorithm
Definition: MMSD_Model.h:140
static const tString PATH_SEPARATOR
Definition: CORE_File.h:31
tVectorIndex getClustersNumber() const
get clusters number
Definition: MMSD_Model.h:165
virtual SP::MMSD_Law NewLawInstance() const =0
create a cluster
#define tVectorIndex
Definition: types.h:42
void computeSampleClusterProbabilities()
compute clusters probability for each sample
Definition: MMSD_Model.h:381
const MMSD_IntegerVector & getSampleClusterIndices() const
get the cluster of samples vector of size N
Definition: MMSD_Model.h:184
This class describes the FullMatrix class.
Definition: MMSD_DoubleFullMatrix.h:17
This class describes the main interface class for a soft user interface (R,matlab,python etc...) class.
Definition: UI_Class.h:38
const MMSD_DoubleVector & getLogL() const
get logL for each iteration of the optimization process
Definition: MMSD_Model.h:442
virtual ~MMSD_Model(void)
destroy an object.
Definition: MMSD_Model.cpp:23
MMSD_Model(void)
create an object
Definition: MMSD_Model.cpp:9
void setWeightInitializationType(const tString &type, const double &scale, const double &rate)
set the weight initialization type & parameters
Definition: MMSD_Model.h:214
#define tBoolean
Definition: types.h:48
void setDataSet(SP::MMSD_DataSet data)
set the data set
Definition: MMSD_Model.h:122
virtual void loadFromUIClass(const UI_Class &mclass)
how to load the object from a Meta Model class
Definition: MMSD_Model.cpp:43
#define null
Definition: types.h:13
This class describes a data set.
Definition: MMSD_DataSet.h:26
tBoolean esperanceEvaluation()
compute Esperance Evaluation step
Definition: MMSD_Model.cpp:552
tBoolean restore(SP::CORE_ClassFactory factory, const tString &backupPath, const tString &backupPrefix, const int &nDigits, const int &step)
restore the model from a file
Definition: MMSD_Model.h:302
void setIsEmptyClusterDeleted(const tBoolean &v)
if true the empty clusters are deleted during esperaceEvaluation() defalut value: false...
Definition: MMSD_Model.h:117
void setMinEigenValue(const double &v)
set min eigen value for eigen value decomposition of property covariance matrix law ...
Definition: MMSD_Model.h:190
tBoolean hasConverged() const
test of convergence
Definition: MMSD_Model.cpp:792
Definition: MMSD_DoubleVector.h:16
tBoolean parametersOptimizationByEMMethod()
optimise the parameters of each laws by EM algorithm
Definition: MMSD_Model.h:273
int getEMMaximumIterationsNumber() const
get the maximum iterations number for EM algorithm
Definition: MMSD_Model.h:147
int getEMIterationsNumber() const
get the number of iterations done
Definition: MMSD_Model.h:155
Definition: MMSD_IntegerVector.h:15
const MMSD_Cluster * getCluster(const tVectorIndex &index) const
get the cluster at index
Definition: MMSD_Model.h:172
const MMSD_DataSet * getDataSet() const
get the data set
Definition: MMSD_Model.h:127
This class is a general MMSD Model.
Definition: MMSD_Model.h:41
tString toString() const
return the string associated to the integer
Definition: CORE_Integer.h:142
#define tString
Definition: types.h:49
virtual void saveToUIClass(UI_Class &mclass) const
how to save the object from a mate model class
Definition: MMSD_Model.cpp:26
tBoolean esperanceMaximization()
compute Esperance Maximization step
Definition: MMSD_Model.cpp:635
const MMSD_DoubleFullMatrix & getSampleClusterProbabilities() const
get the probability of samples to be in cluster matrix of size NxK
Definition: MMSD_Model.h:179
tBoolean parametersOptimizationByEMMethod(const tString &backupPath, const tString &backupPrefix, const int &nDigits, const int &backupSteps)
optimise the parameters of each laws by EM algorithm
Definition: MMSD_Model.h:284
This class is a geneal MMSD Cluster.
Definition: MMSD_Cluster.h:36
double getMinEigenValue() const
get min eigen value for eigen value decomposition of property covariance matrix law ...
Definition: MMSD_Model.h:193
MMSD_DataSet * getDataSet()
get the data set
Definition: MMSD_Model.h:132
tBoolean parametersOptimizationByEMMethod(const int &nClusters, const MMSD_IntegerVector &sampleClusters)
optimise the parameters of each laws by EM algorithm
Definition: MMSD_Model.h:265
void computeSampleClusterIndices(MMSD_DoubleVector &work, MMSD_IntegerVector &indices) const
compute the index of cluster for each sample
Definition: MMSD_Model.cpp:405
virtual tString toString() const
return the string representation of the object node
Definition: CORE_Object.cpp:102
virtual SP::MMSD_Cluster NewClusterInstance() const =0
create a cluster
virtual tString toString() const
turn the class into string
Definition: MMSD_Model.h:462
This class is the base class of all Mixture of Multiple Scaled Distribution package.
Definition: MMSD_Object.h:20