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

Structure encapsulating the parameters of a Poisson_lk 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< Reallambda_
 intensity of the variables
 
Array1D< Stat::Online< Real, Real > > stat_lambda_
 Array of the lambdak_ statistics.
 

Detailed Description

Structure encapsulating the parameters of a Poisson_lk model.

Definition at line 153 of file STK_PoissonParameters.h.

Constructor & Destructor Documentation

◆ ModelParameters() [1/2]

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

default constructor

Parameters
nbClusterthe number of class of the mixture

Definition at line 148 of file STK_PoissonParameters.cpp.

149 : lambda_(nbCluster), stat_lambda_(nbCluster)
150{}
Array1D< Stat::Online< Real, Real > > stat_lambda_
Array of the lambdak_ statistics.
Array1D< Real > lambda_
intensity of the variables

◆ ModelParameters() [2/2]

copy constructor.

Parameters
paramthe parameters to copy.

Definition at line 154 of file STK_PoissonParameters.cpp.

155 : lambda_(param.lambda_), stat_lambda_(param.stat_lambda_)
156{}

◆ ~ModelParameters()

destructor

Definition at line 158 of file STK_PoissonParameters.cpp.

158{}

Member Function Documentation

◆ lambda()

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

Definition at line 172 of file STK_PoissonParameters.h.

172{ return lambda_[k];}

◆ releaseStatistics()

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

Release the computed statistics.

Definition at line 184 of file STK_PoissonParameters.cpp.

185{
186 for(int k=stat_lambda_.begin(); k<stat_lambda_.end(); ++k)
187 { stat_lambda_[k].release();}
188}

◆ resize()

resize the set of parameter

Definition at line 160 of file STK_PoissonParameters.cpp.

161{
162 for (int k = lambda_.begin(); k< lambda_.end(); ++k)
163 { lambda_[k] = 1.;
164 stat_lambda_[k].release();
165 }
166}

◆ setParameters()

template<class Array >
void STK::ModelParameters< Clust::Poisson_lk_ >::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 188 of file STK_PoissonParameters.h.

189 {
190 for(int k=lambda_.begin(); k<lambda_.end(); ++k)
191 { lambda_[k] = params.row(k).mean();}
192 }

◆ setStatistics()

Set the computed statistics.

Definition at line 175 of file STK_PoissonParameters.cpp.

176{
177 for(int k=stat_lambda_.begin(); k<stat_lambda_.end(); ++k)
178 {
179 lambda_[k] = stat_lambda_[k].mean();
180 stat_lambda_[k].release();
181 }
182}

◆ updateStatistics()

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

update statistics of the parameters.

Definition at line 169 of file STK_PoissonParameters.cpp.

170{
171 for(int k=stat_lambda_.begin(); k<stat_lambda_.end(); ++k)
172 { stat_lambda_[k].update(lambda_[k]);}
173}
virtual void update()
update the runner.

Member Data Documentation

◆ lambda_

intensity of the variables

Definition at line 156 of file STK_PoissonParameters.h.

◆ stat_lambda_

Array of the lambdak_ statistics.

Definition at line 158 of file STK_PoissonParameters.h.


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