35#ifndef STK_POISSON_LJK_H
36#define STK_POISSON_LJK_H
38#include "../PoissonModels/STK_PoissonBase.h"
44template<
class Array>
class Poisson_ljk;
54 typedef typename Array::Type
Type;
102 for (
int j=p_data()->beginCols();
j< p_data()->endCols(); ++
j)
105 for (
int k= p_tik->beginCols(); k < p_tik->endCols(); ++k)
115 for (
int j=p_data()->beginCols();
j< p_data()->endCols(); ++
j)
117 for (
int k= p_tik->beginCols(); k < p_tik->endCols(); ++k)
119 param_.lambda_[k][
j] = 0.;
120 for (
int i= p_tik->beginRows();
i < p_tik->endRows(); ++
i)
121 { param_.lambda_[k][
j] += p_data()->elt(
i,
j) * p_tik->elt(
i,k);}
122 param_.lambda_[k][
j] /= p_tk->elt(k);
virtual Real rand() const
Generate a pseudo Exponential random variate.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
Base class for the Poisson models.
Array const *const & p_data() const
Parameters param_
parameters of the derived mixture model.
The Poisson mixture model Poisson_ljk is the most general Poisson model and have a probability functi...
void randomInit(CArrayXX const *const &p_tik, CPointX const *const &p_tk)
Initialize randomly the parameters of the Poisson mixture.
PoissonBase< Poisson_ljk< Array > > Base
Poisson_ljk(int nbCluster)
default constructor
Poisson_ljk(Poisson_ljk const &model)
copy constructor
hidden::MixtureTraits< Poisson_ljk< Array > >::Parameters Parameters
int computeNbFreeParameters() const
bool run(CArrayXX const *const &p_tik, CPointX const *const &p_tk)
Compute the MStep for the lambda_jk .
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.
ModelParameters< Clust::Poisson_ljk_ > Parameters
Type of the structure storing the parameters of a MixturePoisson_ljk model.
Main class for the mixtures traits policy.