35#ifndef STK_POISSON_LJLK_H
36#define STK_POISSON_LJLK_H
38#include "../PoissonModels/STK_PoissonBase.h"
44template<
class Array>
class Poisson_ljlk;
54 typedef typename Array::Type
Type;
100 for (
int j=p_data()->beginCols();
j< p_data()->endCols(); ++
j)
103 for (
int k= p_tik->beginCols(); k < p_tik->endCols(); ++k)
115 param_.lambdaj_ = (
Stat::sumByRow(*p_tik).transpose() * (*p_data()))
117 param_.lambdak_ =
Stat::sumByRow(*p_data()).transpose() * (*p_tik)/(*p_tk);
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_ljlk is a Poisson model with a probability function of the form.
~Poisson_ljlk()
destructor
PoissonBase< Poisson_ljlk< Array > > Base
bool run(CArrayXX const *const &p_tik, CPointX const *const &p_tk)
Compute the weighted probabilities.
int computeNbFreeParameters() const
Poisson_ljlk(Poisson_ljlk const &model)
copy constructor
Poisson_ljlk(int nbCluster)
default constructor
void randomInit(CArrayXX const *const &p_tik, CPointX const *const &p_tk)
Initialize randomly the parameters of the Poisson mixture.
Arrays::SumOp< Lhs, Rhs >::result_type sum(Lhs const &lhs, Rhs const &rhs)
convenience function for summing two arrays
double Real
STK fundamental type of Real values.
hidden::FunctorTraits< Derived, SumOp >::Col sumByRow(Derived const &A)
The namespace STK is the main domain space of the Statistical ToolKit project.
ModelParameters< Clust::Poisson_ljlk_ > Parameters
Type of the structure storing the parameters of a MixturePoisson_ljlk model.
Main class for the mixtures traits policy.