STK++ 0.9.13
|
Gaussian Auto-Associative models. More...
#include <STK_GaussianAAModel.h>
Public Types | |
typedef IStatModel< GaussianAAModel< Array > > | Base |
![]() | |
typedef hidden::ModelTraits< GaussianAAModel< Array > >::Data | Data |
typedef hidden::ModelTraits< GaussianAAModel< 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) | |
Public Member Functions | |
GaussianAAModel (Array *p_workData) | |
Constructor. | |
GaussianAAModel (Array &workData) | |
Constructor. | |
virtual | ~GaussianAAModel () |
virtual destuctor. | |
Real const & | projectedLnLikelihood () const |
Real const & | residualLnLikelihood () const |
ArraySquareX const & | projectedCovariance () const |
ArraySquareX const & | residualCovariance () const |
Real const & | residualVariance () const |
virtual void | setWorkData (Array &workData) |
Set a new working data set. | |
void | computeProjectedCovariance () |
compute the covariance matrix of the projected data set. | |
void | computeModelParameters () |
compute the ln-likelihood of the model | |
![]() | |
~IAAModel () | |
destructor. | |
Array const & | workData () const |
Reducer *const & | p_reducer () const |
Regressor *const & | p_regressor () const |
Array *const & | p_reduced () const |
Array *const & | p_predicted () const |
Array *const & | p_residuals () const |
int | dim () const |
bool | isCentered () const |
bool | isStandardized () const |
PointX const & | mean () const |
PointX const & | std () const |
void | setDimension (int const &dim) |
void | setWorkData (Array &workData) |
void | setReducer (Reducer *p_reducer) |
void | setRegressor (Regressor *p_regressor) |
void | freeReducer () |
delete the reducer set to this model by the method setReducer . | |
void | freeRegressor () |
delete the regressor set to this model by the method setRegressor . | |
void | center () |
center the data set workData_. | |
void | center (VectorX const &weights) |
weighted centering of the data set. | |
void | standardize () |
standardize the data set. | |
void | standardize (VectorX const &weights) |
weighted standardization the data set. | |
void | reductionStep () |
compute the reduction of the data set and store the result in the p_reduced_ container. | |
void | reductionStep (VectorX const &weights) |
compute the weighted dimension reduction of the data set and store the result in the p_reduced_ container. | |
void | regressionStep () |
compute the regression of the original data set and set the results in p_predicted and p_residuals . | |
void | regressionStep (VectorX const &weights) |
compute the weighted regression of the original data set using the reduced data set as predictor and set the results in p_predicted and p_residuals . | |
void | uncenterResults () |
uncenter the predicted data set. | |
void | unstandardizeResults () |
unstandardize the predicted data set and the residuals. | |
![]() | |
~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 | |
void | computeNbFreeParameters () |
compute the number of free parameter of the model. | |
void | computeResidualCovariance () |
compute the covariance matrix of the residuals. | |
void | computeProjectedLnLikelihood () |
compute the ln-likelihood of the projected data set The projected data set is assumed Gaussian with an arbitrary covariance Array. | |
void | computeResidualLnLikelihood () |
compute the ln-likelihood of the projected data set. | |
![]() | |
IAAModel (Array *p_workData) | |
Constructor. | |
IAAModel (Array &workData) | |
Constructor. | |
![]() | |
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 | |
Private Attributes | |
ArraySquareX | projectedCovariance_ |
The covariance matrix of the projected data set. | |
ArraySquareX | residualCovariance_ |
The covariance matrix of the residuals. | |
Real | residualVariance_ |
The total variance of the residuals. | |
Real | projectedLnLikelihood_ |
likelihood of the projected data set. | |
Real | residualLnLikelihood_ |
likelihood of the residuals. | |
Additional Inherited Members | |
![]() | |
Regressor * | p_regressor_ |
pointer on the regression method. | |
Reducer * | p_reducer_ |
pointer on the reeducer. | |
Array * | p_workData_ |
Array of the local data set. | |
Array * | p_reduced_ |
Array of the reduced data set : the data set is shared with p_reducer and set when the regression method is call. | |
Array * | p_predicted_ |
Array of the predicted data set: the data set is shared with p_regressor and set when the regression method is call. | |
Array * | p_residuals_ |
Array of the residuals: the data set is shared with p_regressor and set when the regression method is call. | |
![]() | |
Data const * | p_dataij_ |
A pointer on the original data set. | |
Gaussian Auto-Associative models.
A Gaussian Auto-Associative model is a p-dimensional vector
where the
The vector
with covariance matrix
The Gaussian noise
The GaussianModel class is a factory class which compute the covariance matrix of x, the residual covariance and the number of free parameters of the model. It can be sub-classed or used by any class.
Definition at line 101 of file STK_GaussianAAModel.h.
typedef IStatModel< GaussianAAModel<Array> > STK::GaussianAAModel< Array >::Base |
Definition at line 105 of file STK_GaussianAAModel.h.
STK::GaussianAAModel< Array >::GaussianAAModel | ( | Array * | p_workData | ) |
Constructor.
p_workData | a pointer on the data set to process |
Definition at line 181 of file STK_GaussianAAModel.h.
STK::GaussianAAModel< Array >::GaussianAAModel | ( | Array & | workData | ) |
Constructor.
workData | a reference on the data set to process |
Definition at line 193 of file STK_GaussianAAModel.h.
|
inlinevirtual |
void STK::GaussianAAModel< Array >::computeModelParameters | ( | ) |
compute the ln-likelihood of the model
Definition at line 215 of file STK_GaussianAAModel.h.
|
protected |
compute the number of free parameter of the model.
It is given by the number of parameter of the regression function, the number of variance and covariance of the projected data set (d * (d+1))/2 and the variance of the residuals.
Definition at line 239 of file STK_GaussianAAModel.h.
void STK::GaussianAAModel< Array >::computeProjectedCovariance | ( | ) |
compute the covariance matrix of the projected data set.
This method is set public as the projected covariance can be computed only the first time the data set is projected.
Definition at line 290 of file STK_GaussianAAModel.h.
References _T, STK::GaussianAAModel< Array >::computeProjectedCovariance(), STK::Stat::covariance(), stk_cout, and STKRUNTIME_ERROR_NO_ARG.
Referenced by STK::GaussianAAModel< Array >::computeProjectedCovariance().
|
protected |
compute the ln-likelihood of the projected data set The projected data set is assumed Gaussian with an arbitrary covariance Array.
Definition at line 246 of file STK_GaussianAAModel.h.
References _T, STK::MultiLaw::Normal< RowVector >::lnLikelihood(), STK::mean(), and stk_cout.
|
protected |
compute the covariance matrix of the residuals.
Definition at line 306 of file STK_GaussianAAModel.h.
References _T, STK::GaussianAAModel< Array >::computeResidualCovariance(), STK::Stat::covariance(), stk_cout, and STKRUNTIME_ERROR_NO_ARG.
Referenced by STK::GaussianAAModel< Array >::computeResidualCovariance().
|
protected |
compute the ln-likelihood of the projected data set.
The residuals are assumed orthogonal to the the projected data set with a single residual variance.
Definition at line 270 of file STK_GaussianAAModel.h.
|
inline |
Definition at line 127 of file STK_GaussianAAModel.h.
References STK::GaussianAAModel< Array >::projectedCovariance_.
|
inline |
Definition at line 123 of file STK_GaussianAAModel.h.
References STK::GaussianAAModel< Array >::projectedLnLikelihood_.
|
inline |
Definition at line 129 of file STK_GaussianAAModel.h.
References STK::GaussianAAModel< Array >::residualCovariance_.
|
inline |
Definition at line 125 of file STK_GaussianAAModel.h.
References STK::GaussianAAModel< Array >::residualLnLikelihood_.
|
inline |
Definition at line 131 of file STK_GaussianAAModel.h.
References STK::GaussianAAModel< Array >::residualVariance_.
|
virtual |
Set a new working data set.
workData | the working data set to use |
Definition at line 205 of file STK_GaussianAAModel.h.
References STK::IAAModel< Array >::setWorkData().
Referenced by STK::LinearAAModel< Array >::LinearAAModel(), and STK::LinearAAModel< Array >::LinearAAModel().
|
private |
The covariance matrix of the projected data set.
Definition at line 166 of file STK_GaussianAAModel.h.
Referenced by STK::GaussianAAModel< Array >::projectedCovariance().
|
private |
likelihood of the projected data set.
Definition at line 172 of file STK_GaussianAAModel.h.
Referenced by STK::GaussianAAModel< Array >::projectedLnLikelihood().
|
private |
The covariance matrix of the residuals.
Definition at line 168 of file STK_GaussianAAModel.h.
Referenced by STK::GaussianAAModel< Array >::residualCovariance().
|
private |
likelihood of the residuals.
Definition at line 174 of file STK_GaussianAAModel.h.
Referenced by STK::GaussianAAModel< Array >::residualLnLikelihood().
|
private |
The total variance of the residuals.
Definition at line 170 of file STK_GaussianAAModel.h.
Referenced by STK::GaussianAAModel< Array >::residualVariance().