STK++ 0.9.13
|
Compute the the maximum likelihood estimates of a complete Gaussian statistical model. More...
#include <STK_IGaussianModel.h>
Public Member Functions | |
virtual | ~IGaussianModel () |
destructor. | |
RowVector const & | mean () const |
![]() | |
~IStatModel () | |
destructor | |
Data const *const | p_dataij () const |
void | setData (Data const &data) |
Set the data set of the model. | |
void | setData (Data const *p_data) |
Set the data set of the model. | |
![]() | |
int | nbSample () const |
Real | lnNbSample () const |
int | nbVariable () const |
Real | lnLikelihood () const |
Real | likelihood () const |
int | nbFreeParameter () const |
Real | computeBIC () const |
Real | computeAIC () const |
Real | computeML () const |
Protected Member Functions | |
IGaussianModel (Array const *p_data) | |
constructor. | |
IGaussianModel (Array const &data) | |
constructor. | |
void | compMean () |
compute the empirical mean | |
void | compWeightedMean (ColVector const &weights) |
compute the empirical weighted mean | |
virtual void | compCovariance ()=0 |
compute the empirical covariance matrix. | |
virtual void | compWeightedCovariance (ColVector const &weights)=0 |
compute the empirical weighted covariance matrix. | |
![]() | |
IStatModel (Data const &data) | |
Constructor with data set. | |
IStatModel (Data const *p_data) | |
Constructor with a ptr on the data set. | |
![]() | |
IStatModelBase () | |
Default constructor. | |
IStatModelBase (int nbSample) | |
Constructor with specified dimension. | |
IStatModelBase (int nbSample, int nbVariable) | |
Constructor with specified dimension. | |
IStatModelBase (IStatModelBase const &model) | |
Copy constructor. | |
~IStatModelBase () | |
destructor | |
void | setNbFreeParameter (int const &nbFreeParameter) |
set the number of free parameters of the model | |
void | setNbSample (int const &nbSample) |
set the number of samples of the model | |
void | setNbVariable (int const &nbVariable) |
set the number of variables 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 | |
Protected Attributes | |
RowVector | mean_ |
Vector of the empirical means. | |
![]() | |
Data const * | p_dataij_ |
A pointer on the original data set. | |
Private Types | |
typedef IStatModel< IGaussianModel< Array > > | Base |
typedef hidden::Traits< Array >::Row | RowVector |
typedef hidden::Traits< Array >::Col | ColVector |
Additional Inherited Members | |
![]() | |
typedef hidden::ModelTraits< IGaussianModel< Array > >::Data | Data |
typedef hidden::ModelTraits< IGaussianModel< Array > >::ParamHandler | ParamHandler |
typedef Data::Type | Type |
Type of the data contained in the container. | |
typedef hidden::Traits< Data >::Row | Row |
Type of the row of the data container (a sample) | |
Compute the the maximum likelihood estimates of a complete Gaussian statistical model.
A random vector
The likelihood function of a gaussian sample is:
The maximum likelihood estimate can be performed via matrix calculus formulae Re-write the likelihood in the log form using the trace trick:
The differential of this ln-likelihood is
It naturally breaks down into the part related to the estimation of the mean, and to the part related to the estimation of the variance. The first order condition for maximum,
which leads to the maximum likelihood estimate
This lets us simplify
The first order condition
The IGaussianModel class is an interface class that can be derived in order to impose various constraint on the covariance matrix.
Definition at line 152 of file STK_IGaussianModel.h.
|
private |
Definition at line 154 of file STK_IGaussianModel.h.
|
private |
Definition at line 156 of file STK_IGaussianModel.h.
|
private |
Definition at line 155 of file STK_IGaussianModel.h.
|
inlineprotected |
constructor.
p_data | pointer on the data set |
Definition at line 162 of file STK_IGaussianModel.h.
|
inlineprotected |
constructor.
data | reference on the data set |
Definition at line 166 of file STK_IGaussianModel.h.
|
inlinevirtual |
|
protectedpure virtual |
compute the empirical covariance matrix.
Implemented in STK::GaussianModel< Array >.
|
inlineprotected |
compute the empirical mean
Definition at line 178 of file STK_IGaussianModel.h.
References STK::Stat::mean(), STK::IGaussianModel< Array >::mean_, and STK::IStatModel< IGaussianModel< Array > >::p_dataij_.
|
protectedpure virtual |
compute the empirical weighted covariance matrix.
weights | the weights of the samples |
Implemented in STK::GaussianModel< Array >.
|
inlineprotected |
compute the empirical weighted mean
weights | the weights of the samples |
Definition at line 182 of file STK_IGaussianModel.h.
References STK::Stat::mean(), and STK::IGaussianModel< Array >::mean_.
|
inline |
Definition at line 172 of file STK_IGaussianModel.h.
References STK::IGaussianModel< Array >::mean_.
|
protected |
Vector of the empirical means.
Definition at line 176 of file STK_IGaussianModel.h.
Referenced by STK::IGaussianModel< Array >::compMean(), STK::IGaussianModel< Array >::compWeightedMean(), and STK::IGaussianModel< Array >::mean().