STK++ 0.9.13
|
The Gaussian mixture model Kmm_s
is an isotrope Gaussian mixture model on a kernel space.
More...
#include <STK_Kmm_s.h>
Public Types | |
typedef KmmBase< Kmm_s > | Base |
![]() | |
typedef IMixtureDensity< Kmm_s > | Base |
typedef hidden::MixtureTraits< Kmm_s >::Array | Array |
![]() | |
typedef hidden::MixtureTraits< Derived >::Array | Array |
typedef hidden::MixtureTraits< Derived >::Parameters | Parameters |
typedef hidden::Traits< Array >::Type | Type |
Public Member Functions | |
Kmm_s (int nbCluster) | |
default constructor | |
Kmm_s (Kmm_s const &model) | |
copy constructor | |
~Kmm_s () | |
destructor | |
int | computeNbFreeParameters () const |
Real | lnComponentProbability (int i, int k) const |
void | randomInit (CArrayXX const *const &p_tik, CPointX const *const &p_tk) |
Initialize randomly the variances of the Gaussian kernel mixture. | |
bool | run (CArrayXX const *const &p_tik, CPointX const *const &p_tk) |
update the variances. | |
![]() | |
Real | sigma2 (int k) const |
Real | dim (int k) const |
Kernel::IKernel const *const | p_kernel () const |
CArrayXX | dik () const |
void | setDim (Real const &dim) |
set the dimensions of the kernel mixture model using an unique value | |
void | setDim (ExprBase< Vector > const &dim) |
set the dimension of the kernel mixture model | |
void | setKernel (Kernel::IKernel const *p_kernel) |
set the dimensions of the kernel mixture model using an unique value. | |
Real | impute (int i, int j, Weights const &pk) const |
Real | rand (int i, int j, int k) const |
void | getParameters (ArrayParam ¶ms) const |
This function is used in order to get the current values of the parameters in an array. | |
void | writeParameters (CArrayXX const *p_tik, ostream &os) const |
This function can be used to write summary of parameters to the output stream. | |
int | nbSample () const |
int | nbCluster () const |
![]() | |
~IMixtureDensity () | |
destructor | |
int | nbCluster () const |
int | nbSample () const |
Real | lnNbSample () const |
Array const *const & | p_data () const |
Parameters const & | param () const |
void | setData (Array const &data) |
Set the data set. | |
void | setData (Array const &data, int nbRow, int nbCol, bool byRow=true) |
Set the data set and give dimensions. | |
bool | initializeStep () |
This function will be called at the beginning of the estimation process once the model is created and data is set. | |
void | setParametersStep () |
set the parameters obtained with the intermediate results and release the intermediate results. | |
void | finalizeStep () |
This function will be called once the model is estimated. | |
template<class Weights > | |
Type | sample (int i, int j, Weights const &tk) const |
![]() | |
Derived & | asDerived () |
static cast : return a reference of this with a cast to the derived class. | |
Derived const & | asDerived () const |
static cast : return a const reference of this with a cast to the derived class. | |
Derived * | asPtrDerived () |
static cast : return a ptr on a Derived of this with a cast to the derived class. | |
Derived const * | asPtrDerived () const |
static cast : return a ptr on a constant Derived of this with a cast to the derived class. | |
Derived * | clone () const |
create a leaf using the copy constructor of the Derived class. | |
Derived * | clone (bool isRef) const |
create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not. | |
Additional Inherited Members | |
![]() | |
Parameters | param_ |
parameters of the derived mixture model. | |
![]() | |
KmmBase (int nbCluster) | |
default constructor | |
KmmBase (KmmBase const &model) | |
copy constructor | |
~KmmBase () | |
destructor | |
void | initializeModel () |
Initialize the model before its first use. | |
void | compute_dik (CArrayXX const *p_tik, CPointX const *p_tk) |
compute the distance of the ith individual to the kth centroid | |
void | initializeModelImpl () |
default implementation of initializeModelImpl (do nothing) | |
![]() | |
IMixtureDensity (int nbCluster) | |
Default constructor. | |
IMixtureDensity (IMixtureDensity const &model) | |
copy constructor. | |
void | initializeModel () |
Initialize the model before its first use. | |
bool | initializeStepImpl () |
default implementation of initializeStepImpl (do nothing and return true) | |
void | finalizeStepImpl () |
default implementation of finalizeStepImpl (do nothing) | |
void | setNbSample (int nbSample) |
Set the number of sample of the model (needed by kernel models) | |
![]() | |
IRecursiveTemplate () | |
constructor. | |
~IRecursiveTemplate () | |
destructor. | |
![]() | |
Kernel::IKernel const * | p_kernel_ |
pointer on the kernel | |
CArrayXX | dik_ |
Array of the intermediate results dik. | |
![]() | |
Parameters | param_ |
parameters of the derived mixture model. | |
The Gaussian mixture model Kmm_s
is an isotrope Gaussian mixture model on a kernel space.
It has a density function of the form
where
In a Kmm_s model, the data set refer to the Gram's matrix.
Definition at line 73 of file STK_Kmm_s.h.
Definition at line 76 of file STK_Kmm_s.h.
STK::Kmm_s::Kmm_s | ( | int | nbCluster | ) |
default constructor
nbCluster | number of cluster in the model |
Definition at line 48 of file STK_Kmm_s.cpp.
copy constructor
model | The model to copy |
Definition at line 52 of file STK_Kmm_s.cpp.
STK::Kmm_s::~Kmm_s | ( | ) |
int STK::Kmm_s::computeNbFreeParameters | ( | ) | const |
Definition at line 56 of file STK_Kmm_s.cpp.
References STK::KmmBase< Kmm_s >::param_.
i,k | indexes of the sample and of the component |
Definition at line 62 of file STK_Kmm_s.cpp.
References STK::KmmBase< Kmm_s >::dik_, and STK::KmmBase< Kmm_s >::param_.
Initialize randomly the variances of the Gaussian kernel mixture.
Definition at line 69 of file STK_Kmm_s.cpp.
References _T, STK::KmmBase< Kmm_s >::compute_dik(), STK::KmmBase< Kmm_s >::dik_, STK::KmmBase< Kmm_s >::nbSample(), STK::KmmBase< Kmm_s >::param_, STK::ExprBase< Derived >::prod(), and stk_cout.
update the variances.
Definition at line 85 of file STK_Kmm_s.cpp.
References _T, STK::KmmBase< Kmm_s >::compute_dik(), STK::KmmBase< Kmm_s >::dik_, STK::ExprBase< Derived >::dot(), STK::KmmBase< Kmm_s >::param_, STK::ExprBase< Derived >::prod(), and stk_cout.