35#ifndef STK_DIAGGAUSSIAN_SK_H 
   36#define STK_DIAGGAUSSIAN_SK_H 
   38#include "../DiagGaussianModels/STK_DiagGaussianBase.h" 
   44template<
class Array>
class DiagGaussian_sk;
 
  105  this->randomMean(p_tik);
 
  108  for (
int k= p_tik->beginCols(); k < p_tik->endCols(); ++k)
 
  110    variance = sqrt( ( p_tik->
col(k).transpose()
 
  113                     ).sum() / (p_data()->sizeCols()*p_tk->elt(k))
 
  117                       : std::sqrt(variance/(this->nbSample()*p_data()->sizeCols()));
 
  119#ifdef STK_MIXTURE_VERY_VERBOSE 
  120  stk_cout << 
_T(
"DiagGaussian_sk<Array>::randomInit( CArrayXX const* const& p_tik, CPointX const* const& p_tk)  done\n");
 
 
  129  if (!this->updateMean(p_tik)) 
return false;
 
  131  for (
int k= p_tik->beginCols(); k < p_tik->endCols(); ++k)
 
  134    = sqrt( ( p_tik->
col(k).transpose()
 
  138           /(p_data()->sizeCols()*p_tk->elt(k))
 
 
#define stk_cout
Standard stk output stream.
#define _T(x)
Let x unmodified.
Define the constant point.
Base class for the diagonal Gaussian models.
Array const *const & p_data() const
Parameters param_
parameters of the derived mixture model.
The diagonal Gaussian mixture model DiagGaussian_sk assumes an equal standard deviation in each clust...
~DiagGaussian_sk()
destructor
int computeNbFreeParameters() const
DiagGaussianBase< DiagGaussian_sk< Array > > Base
bool run(CArrayXX const *const &p_tik, CPointX const *const &p_tk)
Compute the weighted mean and the common standard deviation.
void randomInit(CArrayXX const *const &p_tik, CPointX const *const &p_tk)
Initialize randomly the parameters of the Gaussian mixture.
DiagGaussian_sk(int nbCluster)
default constructor
DiagGaussian_sk(DiagGaussian_sk const &model)
copy constructor
hidden::CSlice< Derived, sizeRows_, 1 >::Result col(int j) const
implement the col operator using a reference on the column of the allocator
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.
ModelParameters< Clust::Gaussian_sk_ > Parameters
Type of the structure storing the parameters of a MixturGaussian_sk model.
Main class for the mixtures traits policy.