35#ifndef STK_MIXTURESEMILEARNER_H
36#define STK_MIXTURESEMILEARNER_H
93 template<
class RowVector>
112template<
class RowVector>
118#ifdef STK_MIXTURE_DEBUG
119 stk_cout <<
_T(
"Entering MixtureSemiLearner::setLabels()\n");
129 for (
int i=
zi.begin();
i <
zi.end(); ++
i)
139#ifdef STK_MIXTURE_DEBUG
140 stk_cout <<
_T(
"Terminating MixtureSemiLearner::setLabels()\n");
166 virtual void pStep();
#define STKRUNTIME_ERROR_NO_ARG(Where, Error)
In this file we define the class MixtureComposer.
#define stk_cout
Standard stk output stream.
#define _T(x)
Let x unmodified.
UnaryOperator< IsNaOp< Type >, Derived > isNA() const
hidden::CSlice< Derived, 1, sizeCols_ >::Result row(int i) const
implement the row operator using a reference on the row of the allocator
CArrayXX tik_
The tik probabilities.
CVectorXi const & zi() const
CVectorXi zi_
The zi class label.
Main class for handling composed mixture models.
specialization of the composer for the fixed proportion case.
virtual MixtureSemiLearnerFixedProp * create() const
Create a composer, but reinitialize the mixtures parameters.
virtual void pStep()
overloading of the pStep() method.
virtual ~MixtureSemiLearnerFixedProp()
destructor
virtual MixtureSemiLearnerFixedProp * clone() const
Create a clone of the current model, with mixtures parameters preserved.
Base class for Learning a Mixture mixed model when some classes are known.
virtual void mapStep()
Compute zi using the Map estimate.
virtual void initializeMixtureParameters()
Create the mixture model parameters tik_ and pk_.
virtual int randomZi()
generate random zi_
virtual MixtureSemiLearner * create() const
Create a composer, but reinitialize the mixtures parameters.
virtual int randomTik()
generate random tik_
std::vector< int > unknownLabels_
indexes of the unknown labels
void setLabels(ExprBase< RowVector > const &zi)
Set the known labels.
virtual ~MixtureSemiLearner()
destructor
std::vector< int > const & knownLabels() const
void createSemiLearner(MixtureSemiLearner const *const p_learner)
Copy the ingredient of the semi-learner in the creation process.
virtual int sStep()
Simulate zi accordingly to tik and replace tik by zik by calling cStep().
std::vector< int > const & unknownLabels() const
virtual int cStep()
Replace tik by zik.
virtual Real eStep()
compute the zi, the lnLikelihood of the current estimates and the next value of the tik.
virtual MixtureSemiLearner * clone() const
Create a clone of the current model, with mixtures parameters preserved.
std::vector< int > knownLabels_
indexes of the known labels
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
bool isNA(Type const &x)
utility method allowing to know if a value is a NA (Not Available) value
const int baseIdx
base index of the containers created in STK++.
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.