|
STK++ 0.9.13
|
Base class for the Poisson models. More...
#include <STK_PoissonBase.h>

Public Types | |
| typedef IMixtureDensity< Derived > | Base |
Public Types inherited from STK::IMixtureDensity< Derived > | |
| typedef hidden::MixtureTraits< Derived >::Array | Array |
| typedef hidden::MixtureTraits< Derived >::Parameters | Parameters |
| typedef hidden::Traits< Array >::Type | Type |
Public Member Functions | |
| Real | lambda (int k, int j) const |
| void | initializeModelImpl () |
| Initialize the parameters of the model. | |
| Real | lnComponentProbability (int i, int k) const |
| template<class Weights > | |
| int | impute (int i, int j, Weights const &pk) const |
| Real | impute (int i, int j, CArrayXX const *p_tik) const |
| int | rand (int i, int j, int k) const |
| template<class Array > | |
| void | getParameters (Array ¶ms) const |
| This function is used in order to get the current values of the lambdas. | |
| void | writeParameters (CArrayXX const *p_tik, ostream &os) const |
| This function can be used to write summary of parameters to the output stream. | |
| Array const *const & | p_data () const |
| int | nbCluster () const |
Public Member Functions inherited from STK::IMixtureDensity< Derived > | |
| ~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 |
Public Member Functions inherited from STK::IRecursiveTemplate< Derived > | |
| 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. | |
Public Attributes | |
| Parameters | param_ |
| parameters of the derived mixture model. | |
Protected Member Functions | |
| PoissonBase (int nbCluster) | |
| default constructor | |
| PoissonBase (PoissonBase const &model) | |
| copy constructor | |
| ~PoissonBase () | |
| destructor | |
Protected Member Functions inherited from STK::IMixtureDensity< Derived > | |
| 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) | |
Protected Member Functions inherited from STK::IRecursiveTemplate< Derived > | |
| IRecursiveTemplate () | |
| constructor. | |
| ~IRecursiveTemplate () | |
| destructor. | |
Additional Inherited Members | |
Protected Attributes inherited from STK::IMixtureDensity< Derived > | |
| Parameters | param_ |
| parameters of the derived mixture model. | |
Base class for the Poisson models.
Definition at line 48 of file STK_PoissonBase.h.
| typedef IMixtureDensity<Derived > STK::PoissonBase< Derived >::Base |
Definition at line 51 of file STK_PoissonBase.h.
|
inlineprotected |
default constructor
| nbCluster | number of cluster in the model |
Definition at line 60 of file STK_PoissonBase.h.
|
inlineprotected |
copy constructor
| model | The model to copy |
Definition at line 64 of file STK_PoissonBase.h.
|
inlineprotected |
| void STK::PoissonBase< Derived >::getParameters | ( | Array & | params | ) | const |
This function is used in order to get the current values of the lambdas.
| [out] | params | the array with the parameters of the mixture. |
Definition at line 144 of file STK_PoissonBase.h.
| Real STK::PoissonBase< Derived >::impute | ( | int | i, |
| int | j, | ||
| CArrayXX const * | p_tik | ||
| ) | const |
Definition at line 131 of file STK_PoissonBase.h.
References STK::sum().
| int STK::PoissonBase< Derived >::impute | ( | int | i, |
| int | j, | ||
| Weights const & | pk | ||
| ) | const |
| i,j | indexes of the data to impute |
| pk | the probabilities of each class for the ith individual |
Definition at line 121 of file STK_PoissonBase.h.
References STK::sum().
|
inline |
Initialize the parameters of the model.
Definition at line 72 of file STK_PoissonBase.h.
References STK::PoissonBase< Derived >::p_data(), and STK::PoissonBase< Derived >::param_.
|
inline |
Definition at line 70 of file STK_PoissonBase.h.
References STK::PoissonBase< Derived >::param_.
Referenced by STK::PoissonBase< Derived >::rand().
| Real STK::PoissonBase< Derived >::lnComponentProbability | ( | int | i, |
| int | k | ||
| ) | const |
| i,k | indexes of the sample and of the component |
Definition at line 107 of file STK_PoissonBase.h.
References STK::Law::Poisson::lpdf(), and STK::sum().
|
inline |
Definition at line 124 of file STK_IMixtureDensity.h.
|
inline |
Definition at line 131 of file STK_IMixtureDensity.h.
Referenced by STK::PoissonBase< Derived >::initializeModelImpl().
| i,j,k | indexes of the data to simulate |
Definition at line 89 of file STK_PoissonBase.h.
References STK::PoissonBase< Derived >::lambda(), and STK::Law::Poisson::rand().
| void STK::PoissonBase< Derived >::writeParameters | ( | CArrayXX const * | p_tik, |
| ostream & | os | ||
| ) | const |
This function can be used to write summary of parameters to the output stream.
| p_tik | a constant pointer on the posterior probabilities |
| os | Stream where you want to write the summary of parameters. |
Definition at line 160 of file STK_PoissonBase.h.
References _T.
| Parameters STK::IMixtureDensity< Derived >::param_ |
parameters of the derived mixture model.
Should be an instance of the STK::ModelParameters struct.
Definition at line 180 of file STK_IMixtureDensity.h.
Referenced by STK::PoissonBase< Derived >::initializeModelImpl(), and STK::PoissonBase< Derived >::lambda().