C++ main module for mmsd Package
1.0
|
This class is a Gaussian Law inherits from MMSD_Law. More...
#include <MMSD_GaussianLaw.h>
Public Member Functions | |
MMSD_DoubleVector & | getWork () |
get work vector More... | |
virtual tString | toString () const |
turn the class into string More... | |
const MMSD_DoubleFullMatrix & | getPropertiesMatrixMultByCovarianceDecompositionMatrix () const |
get the properties matrix multiplied by covariance matrix decomposition matrix More... | |
const MMSD_DoubleFullMatrix & | getCovarianceDecompositionMatrix () const |
get the covariance matrix decomposition matrix More... | |
const MMSD_DoubleVector & | getCovarianceDecompositionDiagonal () const |
get the covariance matrix decomposition diagonal More... | |
const MMSD_DoubleVector & | getMean () const |
get the mean of the law More... | |
void | setMinEigenValue (const double &v) |
set the min eigen value available be default 1.e-16 see MMSD_Law::initialize() More... | |
double | getMinEigenValue () const |
get the min eigen value available More... | |
virtual tBoolean | isOutOfBounds () const |
test if the parameters of law are out of bounds ie if (D[i] < mMinEigenValue[i]) More... | |
virtual void | restore (const MMSD_DoubleFullMatrix &properties) |
restore the unstored values after a backup More... | |
virtual void | initialize (const int &clusterIndex, const int &samplesNumber, const MMSD_IntegerVector &clustersIndex, const MMSD_DoubleFullMatrix &properties) |
initialization of the parameters opf the law More... | |
virtual void | optimizeParameters (const MMSD_DoubleFullMatrix &weights, const MMSD_DoubleVector &probs, const MMSD_DoubleFullMatrix &Y) |
optimizes the parameters of the law More... | |
void | sort (MMSD_DoubleVector &nus) |
sorts the law parameters & the array in argument in order to be to the same order than the D diagonal matrix of Y eigen value decomposition More... | |
void | setHasBeenLoaded (const tBoolean &v) |
set the if the object has completely been loaded More... | |
tBoolean | hasBeenLoaded () const |
return true if the object has completely been loaded More... | |
void | getSharedPointer (SP::CORE_Object &p) |
get the shared pointer of this class into p More... | |
void | getSharedPointer (SPC::CORE_Object &p) const |
get the shared pointer of this class into p More... | |
tString | getClassName () const |
return the class name of the object More... | |
tString | getIdentityString () const |
return the identity string of the object of the form className_at_address More... | |
tString | getPointerAddress () const |
return the identity string of the object More... | |
template<class T > | |
tBoolean | isInstanceOf () const |
return true if the object is an instance of T More... | |
virtual void | print () |
print the class More... | |
virtual ostream & | print (ostream &out) const |
print the class More... | |
virtual void | print (const tString &message) |
print the class More... | |
virtual void | print (const tInteger &str) |
print More... | |
virtual void | print (const tRelativeInteger &str) |
print More... | |
virtual void | print (const tReal &str) |
print More... | |
virtual void | print (const int &str) |
print More... | |
Static Public Member Functions | |
static void | initSeed (const long int &v) |
init the seed with v value More... | |
static void | initSeed () |
init the seed More... | |
static tString | getClassName (const tString &identityString) |
return the class name of the object using only the identity string More... | |
template<class T > | |
static tString | getTypeName () |
get type name More... | |
static tBoolean | is64Architecture () |
return true if the machine is a 64 bits machine More... | |
static tBoolean | is32Architecture () |
return true if the machine is a 32 bits machine More... | |
static tString | pointer2String (const void *obj) |
return the string represantation of a pointer More... | |
static void | setOutput (ostream &out) |
set output More... | |
static ostream & | getOutput () |
get output More... | |
static void | printObjectsInMemory () |
print object in memory More... | |
static ostream & | print (ostream &out, const tString &message) |
print the class More... | |
static void | outputPrint (const tString &message) |
Static Public Attributes | |
static tBoolean | mIsMemoryTesting =false |
indicator to store all classes created and deleted only for debuging version More... | |
Protected Member Functions | |
MMSD_GaussianLaw (void) | |
create an object More... | |
virtual | ~MMSD_GaussianLaw (void) |
destroy an object. More... | |
virtual void | updateMean (const MMSD_DoubleFullMatrix &P, const MMSD_DoubleFullMatrix &YP, const MMSD_DoubleFullMatrix &W, const MMSD_DoubleVector &probs, MMSD_DoubleVector &mean) |
update the mean parameters More... | |
virtual void | updateCovarianceDecompositionDiagonal (const MMSD_DoubleFullMatrix &P, const MMSD_DoubleFullMatrix &YP, const MMSD_DoubleVector &mean, const MMSD_DoubleFullMatrix &W, const MMSD_DoubleVector &probs, MMSD_DoubleVector &D) |
pdate the decomposition diagonal of the covariance parameters More... | |
virtual void | updateCovarianceDecompositionMatrix (const MMSD_DoubleFullMatrix &Y, const MMSD_DoubleVector &Diag, const MMSD_DoubleVector &mean, const MMSD_DoubleFullMatrix &W, const MMSD_DoubleVector &probs, MMSD_DoubleFullMatrix &P, MMSD_DoubleFullMatrix &YP)=0 |
updates the matrix P of eigen value decomposition of covariance of Y More... | |
virtual void | saveToUIClass (UI_Class &mclass) const |
how to save the object from a mate model class More... | |
virtual void | loadFromUIClass (const UI_Class &mclass) |
how to load the object from a Meta Model class More... | |
void | setThis (SP::CORE_Object p) |
set this weak shared pointer called toDoAfterThis setting method More... | |
virtual void | setType (tString type) |
set the type of the object More... | |
virtual void | toDoAfterThisSetting () |
method called after setThis() method this method can oly be called once. More... | |
This class is a Gaussian Law inherits from MMSD_Law.
|
protected |
|
protectedvirtual |
destroy an object.
return the class name of the object using only the identity string
Referenced by UI_Class::createVector2D(), LAP_DoublePackedUpperMatrix::matrixProduct(), LAP_DoubleBandedUpperMatrix::matrixProduct(), LAP_DoubleFullUpperMatrix::matrixProduct(), and CORE_Object::printObjectsInMemory().
|
inherited |
return the class name of the object
References tString.
Referenced by CORE_Object::getIdentityString().
|
inlineinherited |
get the covariance matrix decomposition diagonal
Referenced by testGaussianLaw11N(), testGaussianLaw1PN(), and testGaussianLaw2PN().
|
inlineinherited |
get the covariance matrix decomposition matrix
Referenced by testGaussianLaw11N(), testGaussianLaw1PN(), and testGaussianLaw2PN().
|
inlineinherited |
return the identity string of the object of the form className_at_address
References CORE_Object::getClassName(), CORE_Object::pointer2String(), and tString.
Referenced by UI_Class::createPrimitiveMap(), UI_Class::saveAssociation(), UI_Class::saveClass(), UI_ClassFactory::saveIntoClass(), MATH_StiefelFunction::toString(), LAP_2DView::toString(), CORE_Object::toString(), MATH_StiefelOptimizer::toString(), and MM_Class::toString().
|
inlineinherited |
get the mean of the law
Referenced by testGaussianLaw11N(), testGaussianLaw1PN(), and testGaussianLaw2PN().
|
inlineinherited |
get the min eigen value available
Referenced by updateCovarianceDecompositionDiagonal().
|
inlinestaticinherited |
get output
|
inlineinherited |
return the identity string of the object
References CORE_Object::pointer2String().
|
inlineinherited |
get the properties matrix multiplied by covariance matrix decomposition matrix
Referenced by testGaussianLaw11N(), and testGaussianLaw1PN().
|
inlineinherited |
get the shared pointer of this class into p
Referenced by CORE_Map< Key, Value >::getSharedPointer(), CORE_Array< tFlag >::getSharedPointer(), LAP_ConstVector< lapack_real >::getSharedPointer(), STAT_Combinatorial< T >::getSharedPointer(), LAP_Vector< lapack_int >::getSharedPointer(), CORE_Vector< T >::getSharedPointer(), CORE_Matrix< T >::getSharedPointer(), and CORE_Object::printObjectsInMemory().
|
inlineinherited |
get the shared pointer of this class into p
|
inlinestaticinherited |
get type name
References tString.
|
inline |
get work vector
Referenced by MMSD_FluryGautschiGaussianLaw::updateCovarianceDecompositionMatrix().
|
inlineinherited |
return true if the object has completely been loaded
Referenced by UI_Class::loadAssociation().
|
virtualinherited |
initialization of the parameters opf the law
clusterIndex:index | of the cluster of wicth belongs the law |
samplesNumber | number of samples in cluster clusterIndex |
clustersIndex | cluster index of samples |
properties | : properties matrix |
P is the number of properties & N the number of samples.
Reimplemented in MMSD_FluryGautschiGaussianLaw, and MMSD_StiefelGaussianLaw.
References MMSD_DoubleFullMatrix::computeCovarianceMatrix(), MMSD_DoubleSymmetricMatrix::computeEigenValueDecomposition(), LAP_DoubleFullGeneralMatrix::getColumnsNumber(), LAP_DoubleFullGeneralMatrix::getRowsNumber(), LAP_DoubleFullGeneralMatrix::matrixProduct(), MMSD_DoubleSymmetricMatrix::PACKED_STORAGE, LAP_Vector< T >::reverse(), LAP_DoubleFullGeneralMatrix::reverseColumns(), LAP_DoubleFullGeneralMatrix::setSize(), MMSD_DoubleSymmetricMatrix::setSize(), LAP_Vector< T >::setSize(), and MMSD_DoubleSymmetricMatrix::setStorage().
Referenced by MMSD_StiefelGaussianLaw::initialize(), and MMSD_FluryGautschiGaussianLaw::initialize().
|
staticinherited |
init the seed with v value
References STAT_Distribution::initSeed().
|
staticinherited |
init the seed
References CORE_Time::getTime().
Referenced by MMSD_Object::MMSD_Object(), testGaussianLaw11N(), testGaussianLaw1PN(), and testGaussianLaw2PN().
|
inlinestaticinherited |
return true if the machine is a 32 bits machine
References CORE_Object::is64Architecture().
|
staticinherited |
return true if the machine is a 64 bits machine
Referenced by CORE_Object::is32Architecture().
|
inlineinherited |
return true if the object is an instance of T
References null.
|
virtualinherited |
test if the parameters of law are out of bounds ie if (D[i] < mMinEigenValue[i])
References LAP_Vector< T >::getSize().
|
protectedvirtualinherited |
how to load the object from a Meta Model class
Reimplemented from UI_Object.
References UI_Class::loadField(), UI_Class::loadFullMatrixField(), LAP_DoubleFullGeneralMatrix::setValues(), LAP_Vector< T >::setValues(), and tBoolean.
|
inlinevirtualinherited |
optimizes the parameters of the law
call successivly:
References MMSD_Law::updateCovarianceDecompositionDiagonal(), MMSD_Law::updateCovarianceDecompositionMatrix(), and MMSD_Law::updateMean().
|
staticinherited |
print on output
References null, and CORE_Object::print().
Referenced by CORE_Exception::CORE_Exception().
|
staticinherited |
return the string represantation of a pointer
References tString.
Referenced by CORE_Object::CORE_Object(), CORE_Object::getIdentityString(), CORE_Object::getPointerAddress(), and CORE_Object::~CORE_Object().
|
inlinevirtualinherited |
print the class
References CORE_Object::toString().
Referenced by CORE_Object::outputPrint(), CORE_Out::print(), CORE_Object::print(), CORE_Out::printInt(), CORE_Out::println(), CORE_Out::printReal(), CORE_Out::printString(), and CORE_Out::setAction().
|
inlinevirtualinherited |
print the class
References CORE_Object::print(), and CORE_Object::toString().
|
virtualinherited |
print the class
Reimplemented in CORE_Out.
References null, and CORE_Object::print().
|
virtualinherited |
References null.
|
virtualinherited |
References null.
|
inlinestaticinherited |
print the class
|
staticinherited |
print object in memory
References CORE_Object::getClassName(), CORE_Object::getSharedPointer(), and CORE_Object::mIsMemoryTesting.
Referenced by main().
|
virtualinherited |
restore the unstored values after a backup
Thanks to the properties matrix Y, recompute the matrix P.Y
Reimplemented in MMSD_FluryGautschiGaussianLaw, and MMSD_StiefelGaussianLaw.
References LAP_DoubleFullGeneralMatrix::matrixProduct().
Referenced by MMSD_StiefelGaussianLaw::restore(), and MMSD_FluryGautschiGaussianLaw::restore().
|
protectedvirtualinherited |
how to save the object from a mate model class
Reimplemented from UI_Object.
References LAP_DoubleFullGeneralMatrix::getColumnsNumber(), LAP_DoubleFullGeneralMatrix::getRowsNumber(), LAP_Vector< T >::getSize(), LAP_DoubleMatrix::getStorage(), LAP_DoubleMatrixStorage::getValues(), LAP_Vector< T >::getValues(), UI_Class::saveField(), and UI_Class::saveFullMatrixField().
|
inlineinherited |
set the if the object has completely been loaded
Referenced by UI_Class::loadAssociation().
|
inlineinherited |
set the min eigen value available be default 1.e-16 see MMSD_Law::initialize()
|
inlinestaticinherited |
set output
|
inlineprotectedinherited |
set this weak shared pointer called toDoAfterThis setting method
References CORE_Object::toDoAfterThisSetting().
|
inlineprotectedvirtualinherited |
set the type of the object
Referenced by LAP_IntegerVector::LAP_IntegerVector(), MATH_BetaFunction::MATH_BetaFunction(), MATH_C1Function::MATH_C1Function(), MATH_DigammaFunction::MATH_DigammaFunction(), MATH_EigenFunction::MATH_EigenFunction(), MATH_Equation::MATH_Equation(), MATH_Function::MATH_Function(), MATH_GammaFunction::MATH_GammaFunction(), MATH_KeplerFunction::MATH_KeplerFunction(), MATH_LogGammaFunction::MATH_LogGammaFunction(), MATH_NewtonEquation::MATH_NewtonEquation(), MATH_StiefelFunction::MATH_StiefelFunction(), MATH_StiefelOptimizer::MATH_StiefelOptimizer(), MATH_TranscendentEquation::MATH_TranscendentEquation(), MATH_TrigammaFunction::MATH_TrigammaFunction(), MATH_ZeroEquation::MATH_ZeroEquation(), MATH_ZKeplerFunction::MATH_ZKeplerFunction(), MM_Attribute::MM_Attribute(), MM_Class::MM_Class(), MM_ClassFactory::MM_ClassFactory(), MM_Data::MM_Data(), MM_Structure::MM_Structure(), MMSD_ClassFactory::MMSD_ClassFactory(), MMSD_Cluster::MMSD_Cluster(), MMSD_ConstDoubleVector::MMSD_ConstDoubleVector(), MMSD_ConstraintGaussianCluster::MMSD_ConstraintGaussianCluster(), MMSD_ConstraintGaussianModel::MMSD_ConstraintGaussianModel(), MMSD_DataSet::MMSD_DataSet(), MMSD_DataSetClassFactory::MMSD_DataSetClassFactory(), MMSD_DoubleFullMatrix::MMSD_DoubleFullMatrix(), MMSD_DoubleSymmetricMatrix::MMSD_DoubleSymmetricMatrix(), MMSD_DoubleVector::MMSD_DoubleVector(), MMSD_FluryGautschiGaussianLaw::MMSD_FluryGautschiGaussianLaw(), MMSD_GaussianCluster::MMSD_GaussianCluster(), MMSD_GaussianFDFunction::MMSD_GaussianFDFunction(), MMSD_GaussianLaw(), MMSD_GaussianModel::MMSD_GaussianModel(), MMSD_Law::MMSD_Law(), MMSD_Model::MMSD_Model(), MMSD_ModelClassFactory::MMSD_ModelClassFactory(), MMSD_Object::MMSD_Object(), MMSD_StiefelFunction::MMSD_StiefelFunction(), MMSD_StiefelGaussianLaw::MMSD_StiefelGaussianLaw(), STAT_BernoulliDistribution::STAT_BernoulliDistribution(), STAT_BinomialDistribution::STAT_BinomialDistribution(), STAT_Combinatorial< T >::STAT_Combinatorial(), STAT_DiracDistribution::STAT_DiracDistribution(), STAT_Distribution::STAT_Distribution(), STAT_ExponentialDistribution::STAT_ExponentialDistribution(), STAT_GammaDistribution::STAT_GammaDistribution(), STAT_GeometricDistribution::STAT_GeometricDistribution(), STAT_InverseNormalDistribution::STAT_InverseNormalDistribution(), STAT_NormalDistribution::STAT_NormalDistribution(), STAT_Object::STAT_Object(), STAT_PoissonDistribution::STAT_PoissonDistribution(), STAT_UniformDistribution::STAT_UniformDistribution(), and STAT_UniformLaplaceTransform::STAT_UniformLaplaceTransform().
|
inherited |
sorts the law parameters & the array in argument in order to be to the same order than the D diagonal matrix of Y eigen value decomposition
see MMSD_Law::initialization()
References LAP_Vector< T >::getSize(), and tBoolean.
|
inlineprotectedvirtualinherited |
method called after setThis() method this method can oly be called once.
Reimplemented in STAT_UniformLaplaceTransform.
Referenced by CORE_Object::setThis(), and STAT_UniformLaplaceTransform::toDoAfterThisSetting().
|
inlinevirtual |
turn the class into string
Reimplemented from MMSD_Law.
Reimplemented in MMSD_FluryGautschiGaussianLaw, and MMSD_StiefelGaussianLaw.
References MMSD_Law::toString(), and tString.
Referenced by MMSD_StiefelGaussianLaw::toString(), and MMSD_FluryGautschiGaussianLaw::toString().
|
inlineprotectedvirtual |
pdate the decomposition diagonal of the covariance parameters
P | :eigen value matrix decomposition of cov(Y) |
YP | : matrix vector product Y.P of size NxP |
mean | : mean vector of size P |
W | : Weight matrix of size NxP |
probs | : probability vector of size N |
D | : output eigen value diagonal matrix decomposition of cov(Y) |
minValue = MMSDD_law::setminEigenValue() ) work=P.mMean for i in [0,P[
Implements MMSD_Law.
References MMSD_Law::getMinEigenValue().
|
protectedpure virtualinherited |
updates the matrix P of eigen value decomposition of covariance of Y
Y | : properties matrix of size NxP |
Diag | : eigen value diagonal matrix decomposition of cov(Y) |
mean | : mean vector of size P |
W | : Weight matrix of size NxP |
probs | : probability vector of size N |
P | : output eigen value matrix decomposition of cov(Y) of size PxP |
YP | : output matrix vector product Y.P of size NxP |
Implemented in MMSD_FluryGautschiGaussianLaw, and MMSD_StiefelGaussianLaw.
Referenced by MMSD_Law::optimizeParameters().
|
protectedvirtual |
update the mean parameters
P | : eigen value matrix decomposition of cov(Y) |
YP | : matrix vector product Y.P of size NxP |
W | : Weight matrix of size NxP |
probs | : probability vector of size N |
mean | : output mean vector of size P |
for j in [0,P[
Implements MMSD_Law.
References LAP_DoubleVector::add(), LAP_DoubleFullGeneralMatrix::getColumnByReference(), LAP_DoubleFullGeneralMatrix::getColumnsNumber(), LAP_ConstVector< T >::getSize(), LAP_Vector< T >::getSize(), LAP_ConstVector< T >::getValues(), LAP_Vector< T >::getValues(), LAP_ConstDoubleVector::product(), and MMSD_DoubleVector::triProduct().
|
staticinherited |
indicator to store all classes created and deleted only for debuging version
Referenced by CORE_Object::CORE_Object(), main(), CORE_Object::printObjectsInMemory(), and CORE_Object::~CORE_Object().