STK++ 1.0

STK::IStatModelBase Class Reference

Interface base class for all statistical models. More...

#include <STK_IStatModelBase.h>

Inheritance diagram for STK::IStatModelBase:

List of all members.

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

Detailed Description

Interface base class for all statistical models.

A statistical model is defined with various elements

  • A data set with the samples in rows and the variables in column
  • A parameterized probability density

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.


Constructor & Destructor Documentation

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]

virtual destructor

Definition at line 49 of file STK_IStatModelBase.cpp.

{}

Member Function Documentation

Integer const& STK::IStatModelBase::nbSample ( ) const [inline]

get the total available observations

Returns:
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

Returns:
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

Returns:
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

Returns:
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

Returns:
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

Returns:
the number of free parameter

Definition at line 99 of file STK_IStatModelBase.h.

References nbFreeParameter_.

Referenced by STK::BICCriterion::run(), and STK::AICCriterion::run().

{ return nbFreeParameter_;}

Member Data Documentation

number of free parameter of the model

Definition at line 109 of file STK_IStatModelBase.h.

Referenced by STK::GaussianStatModel::GaussianStatModel(), and nbFreeParameter().


The documentation for this class was generated from the following files: