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

Public Member Functions | |
| virtual | ~IStatModelBase () |
| virtual destructor | |
| Integer const & | nbSample () const |
| get the total available observations | |
| Integer const & | nbVar () const |
| get the total available observations | |
| Real | logNbSample () const |
| get the log of the total available observations | |
| Real | logLikelihood () const |
| get the log-likelihood | |
| Real | likelihood () const |
| get the likelihood | |
| Integer const & | nbFreeParameter () const |
| get the number of free parameters | |
Protected Member Functions | |
| IStatModelBase () | |
| Constructor. | |
Protected Attributes | |
| Integer | nbSample_ |
| total available samples | |
| Integer | nbVar_ |
| total available variables | |
| Real | logLikelihood_ |
| likelihood of the sample | |
| Integer | nbFreeParameter_ |
| number of free parameter of the model | |
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 58 of file STK_IStatModelBase.h.
| STK::IStatModelBase::IStatModelBase | ( | ) | [protected] |
Constructor.
Definition at line 42 of file STK_IStatModelBase.cpp.
: nbSample_(0) , nbVar_(0) , logLikelihood_(-Arithmetic<Real>::infinity()) , nbFreeParameter_(0) {}
| STK::IStatModelBase::~IStatModelBase | ( | ) | [virtual] |
| Integer const& STK::IStatModelBase::nbSample | ( | ) | const [inline] |
get the total available observations
Definition at line 71 of file STK_IStatModelBase.h.
References nbSample_.
{ return nbSample_;}
| Integer const& STK::IStatModelBase::nbVar | ( | ) | const [inline] |
get the total available observations
Definition at line 76 of file STK_IStatModelBase.h.
References nbVar_.
{ return nbVar_;}
| Real STK::IStatModelBase::logNbSample | ( | ) | const [inline] |
get the log of the total available observations
Definition at line 81 of file STK_IStatModelBase.h.
References nbSample_.
Referenced by STK::BICCriterion::run().
{ return (nbSample_ <= 0) ? Arithmetic<Real>::NA(): log((double)nbSample_) ;
}
| Real STK::IStatModelBase::logLikelihood | ( | ) | const [inline] |
get the log-likelihood
Definition at line 88 of file STK_IStatModelBase.h.
References logLikelihood_.
Referenced by STK::BICCriterion::run(), and STK::AICCriterion::run().
{ return logLikelihood_;}
| Real STK::IStatModelBase::likelihood | ( | ) | const [inline] |
get the likelihood
Definition at line 93 of file STK_IStatModelBase.h.
References logLikelihood_.
{ return (Arithmetic<Real>::isFinite(logLikelihood_)) ? exp((double)logLikelihood_) : 0.;}
| Integer const& STK::IStatModelBase::nbFreeParameter | ( | ) | const [inline] |
get the number of free parameters
Definition at line 99 of file STK_IStatModelBase.h.
References nbFreeParameter_.
Referenced by STK::BICCriterion::run(), and STK::AICCriterion::run().
{ return nbFreeParameter_;}
Integer STK::IStatModelBase::nbSample_ [protected] |
total available samples
Definition at line 103 of file STK_IStatModelBase.h.
Referenced by STK::ITStatModel< Real, Point, Vector, Matrix >::ITStatModel(), logNbSample(), and nbSample().
Integer STK::IStatModelBase::nbVar_ [protected] |
total available variables
Definition at line 105 of file STK_IStatModelBase.h.
Referenced by STK::GaussianStatModel::GaussianStatModel(), STK::ITStatModel< Real, Point, Vector, Matrix >::ITStatModel(), and nbVar().
Real STK::IStatModelBase::logLikelihood_ [protected] |
likelihood of the sample
Definition at line 107 of file STK_IStatModelBase.h.
Referenced by STK::ITStatModel< Real, Point, Vector, Matrix >::compLogLikelihood(), likelihood(), logLikelihood(), and STK::GaussianStatModel::run().
Integer STK::IStatModelBase::nbFreeParameter_ [protected] |
number of free parameter of the model
Definition at line 109 of file STK_IStatModelBase.h.
Referenced by STK::GaussianStatModel::GaussianStatModel(), and nbFreeParameter().