42 static const tFlag CONSTANT_WEIGHT_INITIALIZATION;
43 static const tFlag GAMMA_WEIGHT_INITIALIZATION;
44 static const double EMPTY_LIMIT;
46 tFlag mWeightInitializationType;
47 double mWeightShapeInitialization;
48 double mWeightRateInitialization;
56 double mMaxFreedomDegreeValue;
110 const double& rate) {
113 if (t.compare(
"gamma")==0) {
130 const double& rate) {
131 mWeightInitializationType=t;
132 mWeightShapeInitialization=shape;
133 mWeightRateInitialization=rate;
149 mMaxFreedomDegreeValue=v;
154 return mMaxFreedomDegreeValue;
172 return mFreedomDegrees;
215 virtual void initialize(
const int& clusterIndex,
229 updateWeights(mLaw->getPropertiesMatrixMultByCovarianceDecompositionMatrix(),
230 mLaw->getCovarianceDecompositionMatrix(),
231 mLaw->getCovarianceDecompositionDiagonal(),
241 mLaw->optimizeParameters(mWeights,probs,properties);
255 mLaw->sort(mFreedomDegrees);
262 mLaw->getCovarianceDecompositionMatrix(),
263 mLaw->getCovarianceDecompositionDiagonal(),
272 Pk.
setSize(mLaw->getPropertiesMatrixMultByCovarianceDecompositionMatrix().getRowsNumber());
275 mLaw->getCovarianceDecompositionMatrix(),
276 mLaw->getCovarianceDecompositionDiagonal(),
double getRate() const
get rate of the cluster which is the percent of samples in this cluster.
Definition: MMSD_Cluster.h:159
void updateLaw(const MMSD_DoubleFullMatrix &properties, const MMSD_DoubleVector &probs)
update the law parameters
Definition: MMSD_Cluster.h:240
double getMaxFreedomDegreeValue() const
get the max freedom degree value
Definition: MMSD_Cluster.h:153
const MMSD_DoubleVector & getFreedomDegrees() const
get the freedom degree of property of size P
Definition: MMSD_Cluster.h:171
void updateFreedomDegrees(const MMSD_DoubleVector &probs)
update the freedom degrees
Definition: MMSD_Cluster.h:246
This class describes the FullMatrix class.
Definition: MMSD_DoubleFullMatrix.h:17
virtual tString toString() const
turn the class into string
Definition: MMSD_Cluster.h:351
This class describes the main interface class for a soft user interface (R,matlab,python etc...) class.
Definition: UI_Class.h:38
void sort()
sort the freedom degrees with respect to the law
Definition: MMSD_Cluster.h:254
virtual void restore(const MMSD_DoubleFullMatrix &properties)
restore the unstored values after a backup
Definition: MMSD_Cluster.cpp:72
DEFINE_SVPTR(MMSD_Cluster)
void toLower()
turn the string to lower case
Definition: CORE_String.h:295
#define tBoolean
Definition: types.h:48
void setWeightInitializationType(const tFlag &t, const double &shape, const double &rate)
set the weight initialization type
Definition: MMSD_Cluster.h:128
void setWeightInitializationType(const tFlag &t)
set the weight initialization type
Definition: MMSD_Cluster.h:139
void setLaw(SP::MMSD_Law law)
set the law
Definition: MMSD_Cluster.h:178
MMSD_Cluster(void)
create an object
Definition: MMSD_Cluster.cpp:14
void setMaxFreedomDegreeValue(const double &v)
set the max freedom degree value
Definition: MMSD_Cluster.h:148
Definition: MMSD_DoubleVector.h:16
const MMSD_Law * getLaw() const
get the law
Definition: MMSD_Cluster.h:183
virtual const T * getValues() const
get the values for reading
Definition: LAP_Vector.h:497
virtual void initialize(const int &clusterIndex, const MMSD_IntegerVector &clusterIndexSamples, const MMSD_DoubleFullMatrix &properties)
initialize the cluster
Definition: MMSD_Cluster.cpp:85
Definition: MMSD_IntegerVector.h:15
tBoolean isEmpty() const
return true is the cluster is empty
Definition: MMSD_Cluster.h:190
void setWeightInitializationType(const tString &type, const double &shape, const double &rate)
set the weight initialization type
Definition: MMSD_Cluster.h:108
virtual ~MMSD_Cluster(void)
destroy an object.
Definition: MMSD_Cluster.cpp:25
void computeMultivariateDensity(double *Pk) const
compute the probabities of samples to be in cluster This
Definition: MMSD_Cluster.h:260
void updateRate(const MMSD_DoubleVector &clusterProbabilitiesSamples)
update the rate of the cluster
Definition: MMSD_Cluster.cpp:152
#define tString
Definition: types.h:49
void computeMultivariateDensity(MMSD_DoubleVector &Pk) const
compute the probabities of samples to be in cluster This
Definition: MMSD_Cluster.h:271
DEFINE_SPTR(MMSD_Cluster)
virtual void loadFromUIClass(const UI_Class &mclass)
how to load the object from a Meta Model class
Definition: MMSD_Cluster.cpp:50
This class is a geneal MMSD Cluster.
Definition: MMSD_Cluster.h:36
virtual void saveToUIClass(UI_Class &mclass) const
how to save the object from a mate model class
Definition: MMSD_Cluster.cpp:27
void updateWeights(const MMSD_DoubleVector &probs)
update the weights of the cluster
Definition: MMSD_Cluster.h:228
This class is a geneal MMSD Law.
Definition: MMSD_Law.h:33
virtual tString toString() const
return the string representation of the object node
Definition: CORE_Object.cpp:102
const MMSD_DoubleFullMatrix & getWeights() const
get the weight of sample 's property of size NxP
Definition: MMSD_Cluster.h:165
void setSize(const tLVectorIndex &n)
set the view to [0,n[ by 1 increment if values is too small, re-alocate it
Definition: LAP_Vector.h:360
This class is the base class of all Mixture of Multiple Scaled Distribution package.
Definition: MMSD_Object.h:20
#define tFlag
Definition: types.h:14