STK++ 0.9.13
STK::ModelParameters< Clust::Poisson_ljk_ > Struct Reference

Structure encapsulating the parameters of a Poisson_ljlk model. More...

#include <STK_PoissonParameters.h>

Public Member Functions

 ModelParameters (int nbCluster)
 default constructor
 
 ModelParameters (ModelParameters const &param)
 copy constructor.
 
 ~ModelParameters ()
 destructor
 
Real constlambda (int k, int j) const
 
void resize (Range const &range)
 resize the set of parameter
 
void updateStatistics ()
 update statistics of the parameters.
 
void setStatistics ()
 Set the computed statistics.
 
void releaseStatistics ()
 Release the computed statistics.
 
template<class Array >
void setParameters (ExprBase< Array > const &params)
 Set the parameters of the mixture model.
 

Public Attributes

Array1D< CPointXlambda_
 intensity of the variables
 
Array1D< Stat::Online< CPointX, Real > > stat_lambda_
 Array of the lambdak_ statistics.
 

Detailed Description

Structure encapsulating the parameters of a Poisson_ljlk model.

Definition at line 107 of file STK_PoissonParameters.h.

Constructor & Destructor Documentation

◆ ModelParameters() [1/2]

STK::ModelParameters< Clust::Poisson_ljk_ >::ModelParameters ( int  nbCluster)

default constructor

Parameters
nbClusterthe number of class of the mixture

Definition at line 43 of file STK_PoissonParameters.cpp.

44 : lambda_(nbCluster)
45 , stat_lambda_(nbCluster)
46{}
Array1D< Stat::Online< CPointX, Real > > stat_lambda_
Array of the lambdak_ statistics.
Array1D< CPointX > lambda_
intensity of the variables

◆ ModelParameters() [2/2]

copy constructor.

Parameters
paramthe parameters to copy.

Definition at line 50 of file STK_PoissonParameters.cpp.

51 : lambda_(param.lambda_)
52 , stat_lambda_(param.stat_lambda_)
53{}

◆ ~ModelParameters()

destructor

Definition at line 55 of file STK_PoissonParameters.cpp.

55{}

Member Function Documentation

◆ lambda()

Real const & STK::ModelParameters< Clust::Poisson_ljk_ >::lambda ( int  k,
int  j 
) const
inline
Returns
the intensity of the kth cluster and jth variable

Definition at line 126 of file STK_PoissonParameters.h.

126{ return lambda_[k][j];}

◆ releaseStatistics()

void STK::ModelParameters< Clust::Poisson_ljk_ >::releaseStatistics ( )

Release the computed statistics.

Definition at line 81 of file STK_PoissonParameters.cpp.

82{
83 for(int k=stat_lambda_.begin(); k<stat_lambda_.end(); ++k)
84 { stat_lambda_[k].release();}
85}

◆ resize()

resize the set of parameter

Definition at line 57 of file STK_PoissonParameters.cpp.

58{
59 for (int k = lambda_.begin(); k< lambda_.end(); ++k)
60 {
61 lambda_[k].resize(range) = 1.;
62 stat_lambda_[k].resize(range);
63 }
64}

◆ setParameters()

template<class Array >
void STK::ModelParameters< Clust::Poisson_ljk_ >::setParameters ( ExprBase< Array > const params)
inline

Set the parameters of the mixture model.

It is assumed that the array params is of size (nbCluster, nbVariable).

Definition at line 142 of file STK_PoissonParameters.h.

143 {
144 for(int k=lambda_.begin(); k<lambda_.end(); ++k)
145 { lambda_[k] = params.row(k);}
146 }

◆ setStatistics()

Set the computed statistics.

Definition at line 72 of file STK_PoissonParameters.cpp.

73{
74 for(int k=stat_lambda_.begin(); k<stat_lambda_.end(); ++k)
75 {
76 lambda_[k] = stat_lambda_[k].mean();
77 stat_lambda_[k].release();
78 }
79}

◆ updateStatistics()

void STK::ModelParameters< Clust::Poisson_ljk_ >::updateStatistics ( )

update statistics of the parameters.

Definition at line 66 of file STK_PoissonParameters.cpp.

67{
68 for(int k=stat_lambda_.begin(); k<stat_lambda_.end(); ++k)
69 { stat_lambda_[k].update(lambda_[k]);}
70}
virtual void update()
update the runner.

Member Data Documentation

◆ lambda_

intensity of the variables

Definition at line 110 of file STK_PoissonParameters.h.

◆ stat_lambda_

Array of the lambdak_ statistics.

Definition at line 112 of file STK_PoissonParameters.h.


The documentation for this struct was generated from the following files: