37#ifndef STK_IMULTISTATMODEL_H
38#define STK_IMULTISTATMODEL_H
111template <
class Derived>
129 { this->
initialize(data.dataij().sizeRows(), data.dataij().sizeCols());}
203 this->
asDerived().computeParameters(weights);
220 stk_cout <<
_T(
"You should implement this method in your derived class\n");
237 for (
int i=
p_data()->dataij().beginRows(); i<
p_data()->dataij().endRows(); i++)
In this file we define the data wrapper class.
In this file we define the interface base class IStatModelBase.
#define STKERROR_NO_ARG(Where, Error)
In this file we define the Interface base classes IMultiLaw and JointProbability.
#define stk_cout
Standard stk output stream.
#define _T(x)
Let x unmodified.
This file include all the other header files of the project Sdk.
Base class for all Exceptions thrown by the STK++ library.
virtual const String error() const
Returns a C-style character string describing the general cause of the current error.
void setData(Data const *p_data)
Set the data set.
Real computeLnLikelihood() const
compute the log Likelihood of the statistical model.
String const & error() const
hidden::StatModelTraits< Derived >::Parameters Parameters
Type of the parameters of the Model.
hidden::StatModelTraits< Derived >::WColVector WColVector
Type of the vector with the weights.
IMultiStatModel(Data const &data)
Constructor with data set.
~IMultiStatModel()
destructor
bool run(WColVector const &weights)
compute the weighted empirical probability of success based on the observed variables.
void writeParametersImpl(ostream &os)
default implementation of the writeParameters method.
Parameters const & param() const
hidden::StatModelTraits< Derived >::Type Type
Type of the data in the container.
IMultiStatModel(IMultiStatModel const &model)
Copy constructor.
hidden::StatModelTraits< Derived >::Data Data
Type of the container with the data.
void writeParameters(ostream &os)
IMultiStatModel()
default constructor.
Data const *const p_data() const
IMultiStatModel(Data const *p_data)
Constructor with a ptr on the data set.
bool run()
Estimate the parameters of the model and update the model.
void update()
update the model if a new data set is set
IRecursiveTemplate()
constructor.
Derived & asDerived()
static cast : return a reference of this with a cast to the derived class.
IStatModelBase()
Default constructor.
void setNbFreeParameter(int const &nbFreeParameter)
set the number of free parameters of the model
void setLnLikelihood(Real const &lnLikelihood)
set the log-likelihood of the model
void initialize(int nbSample, int nbVariable)
set the dimensions of the parameters of the model
Arrays::SumOp< Lhs, Rhs >::result_type sum(Lhs const &lhs, Rhs const &rhs)
convenience function for summing two arrays
std::basic_string< Char > String
STK fundamental type of a String.
double Real
STK fundamental type of Real values.
std::basic_ostream< Char > ostream
ostream for Char
The hidden namespace enclose the classes and methods which are used internally by the STK++ classes.
The namespace STK is the main domain space of the Statistical ToolKit project.
struct storing the parameters of the mixture.
Policy trait class for (Stat) Model classes.