|
STK++ 1.0
|
Interface base class for all statistical models. More...
#include <STK_ITStatModel.h>

Public Member Functions | |
| virtual | ~ITStatModel () |
| virtual destructor | |
| MultiLaw const * | p_law () const |
| give the probability law of the model | |
| virtual void | setLaw (MultiLaw *p_law) |
| Set the probability law of the model. | |
Protected Member Functions | |
| ITStatModel (Container2D const *p_data) | |
| Constructor. | |
| virtual void | compLogLikelihood () |
| compute the log Likelihood of the statistical model. | |
Protected Attributes | |
| MultiLaw * | p_law_ |
| a pointer on the probability law. | |
Private Types | |
| typedef ITContainer2D< TYPE, TContainerHo, TContainerVe, TContainer2D > | Container2D |
| Type of the container containing the data. | |
| typedef Law::ITMultivariate < TYPE, TContainerHo > | MultiLaw |
| Type of the law. | |
| typedef IRunnerPtr2D< TYPE, TContainerHo, TContainerVe, TContainer2D > | Runner2D |
| Type of the Runner. | |
Interface base class for all statistical models.
A statistical model is defined with various elements
We are making the assumption that the variables are all of the same type and stored in a class deriving from ITContainer2D.
Definition at line 63 of file STK_ITStatModel.h.
typedef ITContainer2D<TYPE, TContainerHo, TContainerVe, TContainer2D> STK::ITStatModel< TYPE, TContainerHo, TContainerVe, TContainer2D >::Container2D [private] |
Type of the container containing the data.
Reimplemented from STK::IRunnerPtr2D< TYPE, TContainerHo, TContainerVe, TContainer2D >.
Definition at line 67 of file STK_ITStatModel.h.
typedef Law::ITMultivariate<TYPE, TContainerHo> STK::ITStatModel< TYPE, TContainerHo, TContainerVe, TContainer2D >::MultiLaw [private] |
Type of the law.
Definition at line 69 of file STK_ITStatModel.h.
typedef IRunnerPtr2D< TYPE, TContainerHo, TContainerVe, TContainer2D> STK::ITStatModel< TYPE, TContainerHo, TContainerVe, TContainer2D >::Runner2D [private] |
Type of the Runner.
Definition at line 71 of file STK_ITStatModel.h.
| STK::ITStatModel< TYPE, TContainerHo, TContainerVe, TContainer2D >::ITStatModel | ( | Container2D const * | p_data | ) | [inline, protected] |
| virtual STK::ITStatModel< TYPE, TContainerHo, TContainerVe, TContainer2D >::~ITStatModel | ( | ) | [inline, virtual] |
| MultiLaw const* STK::ITStatModel< TYPE, TContainerHo, TContainerVe, TContainer2D >::p_law | ( | ) | const [inline] |
give the probability law of the model
Definition at line 94 of file STK_ITStatModel.h.
Referenced by STK::ITStatModel< Real, Point, Vector, Matrix >::setLaw().
{ return p_law_;}
| virtual void STK::ITStatModel< TYPE, TContainerHo, TContainerVe, TContainer2D >::setLaw | ( | MultiLaw * | p_law | ) | [inline, virtual] |
Set the probability law of the model.
| p_law | the probability law of the model |
Definition at line 99 of file STK_ITStatModel.h.
| virtual void STK::ITStatModel< TYPE, TContainerHo, TContainerVe, TContainer2D >::compLogLikelihood | ( | ) | [inline, protected, virtual] |
compute the log Likelihood of the statistical model.
Definition at line 106 of file STK_ITStatModel.h.
{
// no data
if (!this->p_data_) return;
// check there exists a law
if (!p_law_) throw std::runtime_error("In ITStatModel::compLogLikelihood() "
"p_law_ is not initialized.");
// get dimensions of the samples and sum over all log-likelihood values
const Integer first = this->p_data_->firstRow(), last = this->p_data_->lastRow();
Real sum = 0.0;
for (Integer i=first; i<= last; i++)
{
sum += p_law_->lpdf(this->p_data_->row(i));
}
logLikelihood_ = sum;
}
MultiLaw* STK::ITStatModel< TYPE, TContainerHo, TContainerVe, TContainer2D >::p_law_ [protected] |
a pointer on the probability law.
Definition at line 103 of file STK_ITStatModel.h.
Referenced by STK::ITStatModel< Real, Point, Vector, Matrix >::compLogLikelihood(), STK::ITStatModel< Real, Point, Vector, Matrix >::p_law(), STK::ITStatModel< Real, Point, Vector, Matrix >::setLaw(), and STK::ITStatModel< Real, Point, Vector, Matrix >::~ITStatModel().