37#ifndef STK_IUNIVSTATMODEL_H
38#define STK_IUNIVSTATMODEL_H
85template <
class ColVector,
class WColVector,
class UnivariateLaw>
91 typedef typename ColVector::Type
Type;
120 inline UnivariateLaw
const&
law()
const {
return law_;}
In this file we define the interface base class IStatModelBase.
#define STKERROR_NO_ARG(Where, Error)
This file include all the other header files of the project Sdk.
Sdk class for all library Exceptions.
virtual const String error() const
Returns a C-style character string describing the general cause of the current error.
String msg_error_
String with the last error message.
Abstract class for all classes making unsupervised learning.
ColVector const * p_data() const
get the data set
Interface base class for all Statistical Models.
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
Base class for all Statistical Models.
IUnivStatModel(ColVector const *p_data)
Constructor with a ptr on the data set.
IUnivStatModel(IUnivStatModel const &model)
Copy constructor.
UnivariateLaw const & law() const
virtual bool run(WColVector const &weights)
compute the weighted empirical probability of success based on the observed variables.
Real computeLnLikelihood() const
compute the log Likelihood of the statistical model.
virtual bool run()
Estimate the parameters of the model and update the.
IRunnerUnsupervised< ColVector, WColVector > Runner
Type of the Runner.
virtual int computeNbFreeParameters() const =0
compute the number of free parameters
ColVector::Type Type
Type of the data contained in the container.
UnivariateLaw law_
The probability law of the model.
virtual void computeParameters()=0
compute the parameters
virtual void computeParameters(WColVector const &weights)=0
compute the weighted parameters
IUnivStatModel()
default constructor.
virtual ~IUnivStatModel()
destructor
virtual void update()
This virtual method will be called if the user set a new data set.
IUnivStatModel(ColVector const &data)
Constructor with data set.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
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.
The namespace STK is the main domain space of the Statistical ToolKit project.
Arithmetic properties of STK fundamental types.