|
STK++ 0.9.13
|
A Linear AutoAssociative Model (LAAM) is a generalization of the PCA model for projecting variables on an affine plane of lower dimension. More...
#include <STK_LinearAAModel.h>

Public Types | |
| typedef IRunnerUnsupervised< Array, VectorX > | Runner |
| typedef GaussianAAModel< Array > | Base |
Public Types inherited from STK::GaussianAAModel< Array > | |
| typedef IStatModel< GaussianAAModel< Array > > | Base |
Public Types inherited from STK::IStatModel< GaussianAAModel< Array > > | |
| 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 | |
| LinearAAModel (Array const &data) | |
| constructor. | |
| LinearAAModel (LinearAAModel const &model) | |
| copy constructor. | |
| virtual | ~LinearAAModel () |
| Virtual destructor. | |
| virtual LinearAAModel * | clone () const |
| clone pattern | |
| bool | run (int const &dim) |
| run the estimation of the AA model. | |
| bool | run (VectorX const &weights, int const &dim) |
| run the estimation of the weighted AA model. | |
| virtual bool | run () |
| run the estimation of the AA model. | |
| virtual bool | run (VectorX const &weights) |
| run the estimation of the weighted AA model. | |
Public Member Functions inherited from STK::IRunnerUnsupervised< Array, VectorX > | |
| Array const * | p_data () const |
| get the data set | |
| virtual void | setData (Array const *p_data) |
| Set the data set. | |
| virtual void | setData (Array const &data) |
| Set the data set. | |
Public Member Functions inherited from STK::IRunnerBase | |
| String const & | error () const |
| get the last error message. | |
Public Member Functions inherited from STK::GaussianAAModel< Array > | |
| 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 | |
Public Member Functions inherited from STK::IAAModel< Array > | |
| ~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. | |
Public Member Functions inherited from STK::IStatModel< GaussianAAModel< Array > > | |
| ~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. | |
Public Member Functions inherited from STK::IStatModelBase | |
| 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 |
Static Public Member Functions | |
| static void | simul (const Law::IUnivLaw< Real > &law, VectorX const &mu, Real const &std, Array &proj, Array &data) |
Simulate a centered auto-associative linear model in ![]() | |
Protected Attributes | |
| Array | workData_ |
| working data set; | |
Protected Attributes inherited from STK::IRunnerUnsupervised< Array, VectorX > | |
| Array const * | p_data_ |
| A pointer on the original data set. | |
Protected Attributes inherited from STK::IRunnerBase | |
| String | msg_error_ |
| String with the last error message. | |
| bool | hasRun_ |
true if run has been used, false otherwise | |
Protected Attributes inherited from STK::IAAModel< Array > | |
| 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. | |
Protected Attributes inherited from STK::IStatModel< GaussianAAModel< Array > > | |
| Data const * | p_dataij_ |
| A pointer on the original data set. | |
Additional Inherited Members | |
Protected Member Functions inherited from STK::IRunnerUnsupervised< Array, VectorX > | |
| IRunnerUnsupervised () | |
| default constructor. | |
| IRunnerUnsupervised (Array const *const p_data) | |
| constructor with a pointer on the constant data set | |
| IRunnerUnsupervised (Array const &data) | |
| constructor with a constant reference on the data set | |
| IRunnerUnsupervised (IRunnerUnsupervised const &runner) | |
| copy constructor | |
| ~IRunnerUnsupervised () | |
| destructor | |
Protected Member Functions inherited from STK::IRunnerBase | |
| IRunnerBase () | |
| default constructor | |
| IRunnerBase (IRunnerBase const &runner) | |
| copy constructor | |
| virtual | ~IRunnerBase () |
| destructor | |
| virtual void | update () |
| update the runner. | |
Protected Member Functions inherited from STK::GaussianAAModel< Array > | |
| 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. | |
Protected Member Functions inherited from STK::IAAModel< Array > | |
| IAAModel (Array *p_workData) | |
| Constructor. | |
| IAAModel (Array &workData) | |
| Constructor. | |
Protected Member Functions inherited from STK::IStatModel< GaussianAAModel< Array > > | |
| IStatModel (Data const &data) | |
| Constructor with data set. | |
| IStatModel (Data const *p_data) | |
| Constructor with a ptr on the data set. | |
Protected Member Functions inherited from STK::IStatModelBase | |
| 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 | |
A Linear AutoAssociative Model (LAAM) is a generalization of the PCA model for projecting variables on an affine plane of lower dimension.
A SLAAM is a (probabilistic) model of the form
![\[
Y = \boldsymbol{\mu}
+ \sum_{j=1}^{q} \mathrm{Reg}^j(C^j) + \epsilon
\]](form_23.png)
in 



![\[
C^j = <a^j,Y>.
\]](form_27.png)
where the 
The regression functions 
A LAAM is an auto-associative model of the form

In this implementation, the axis 
The principal variables 
setRegresor method. it will be created by this object.
Definition at line 95 of file STK_LinearAAModel.h.
| typedef GaussianAAModel<Array> STK::LinearAAModel< Array >::Base |
Definition at line 100 of file STK_LinearAAModel.h.
| typedef IRunnerUnsupervised<Array, VectorX> STK::LinearAAModel< Array >::Runner |
Definition at line 99 of file STK_LinearAAModel.h.
| STK::LinearAAModel< Array >::LinearAAModel | ( | Array const & | data | ) |
constructor.
compute the Linear AA models of the matrix data using the local variance as criteria.
| data | the data set to modelize |
Definition at line 204 of file STK_LinearAAModel.h.
References STK::IAAModel< Array >::p_regressor_, STK::IRunnerUnsupervised< Array, VectorX >::setData(), STK::GaussianAAModel< Array >::setWorkData(), and STK::LinearAAModel< Array >::workData_.
| STK::LinearAAModel< Array >::LinearAAModel | ( | LinearAAModel< Array > const & | model | ) |
copy constructor.
| model | the model to copy |
Definition at line 216 of file STK_LinearAAModel.h.
References STK::IAAModel< Array >::p_regressor_, STK::IRunnerUnsupervised< Array, VectorX >::setData(), STK::GaussianAAModel< Array >::setWorkData(), and STK::LinearAAModel< Array >::workData_.
|
virtual |
|
inlinevirtual |
clone pattern
Definition at line 122 of file STK_LinearAAModel.h.
|
virtual |
run the estimation of the AA model.
The behavior of the estimation is the following :
The data have to be centered before running the computations.
Implements STK::IRunnerUnsupervised< Array, VectorX >.
Definition at line 247 of file STK_LinearAAModel.h.
References _T, STK::Exception::error(), STK::IRunnerBase::error(), STK::IRunnerBase::msg_error_, STK::MultidimRegression< Array, Weight >::regressionStep(), STK::LinearAAModel< Array >::run(), stk_cout, and STKERROR_NO_ARG.
Referenced by STK::LinearAAModel< Array >::run(), and STK::LinearAAModel< Array >::run().
| bool STK::LinearAAModel< Array >::run | ( | int const & | dim | ) |
run the estimation of the AA model.
The behavior of the estimation is the following :
| dim | the dimension of the AA Model |
Definition at line 233 of file STK_LinearAAModel.h.
References _T, STK::IRunnerBase::error(), STK::IRegression< Array, Array, Weight >::run(), and stk_cerr.
|
virtual |
run the estimation of the weighted AA model.
The behavior of the estimation is the following :
The data have to be centered before running the computations.
| weights | the container of the weights |
Implements STK::IRunnerUnsupervised< Array, VectorX >.
Definition at line 301 of file STK_LinearAAModel.h.
References _T, STK::Exception::error(), STK::IRunnerBase::error(), STK::IRunnerBase::msg_error_, STK::MultidimRegression< Array, Weight >::regressionStep(), STK::LinearAAModel< Array >::run(), stk_cout, and STKRUNTIME_ERROR_NO_ARG.
| bool STK::LinearAAModel< Array >::run | ( | VectorX const & | weights, |
| int const & | dim | ||
| ) |
run the estimation of the weighted AA model.
The behavior of the estimation is the following :
The data have to be centered before running the computations.
| dim | the dimension of the AA Model |
| weights | the container of the weights |
Definition at line 295 of file STK_LinearAAModel.h.
References STK::IRegression< Array, Array, Weight >::run().
|
static |
Simulate a centered auto-associative linear model in 
![\[
X = X.P.P' + \epsilon
\]](form_33.png)
with 
| law | the law to use in order to simulate the data. |
| mu | the position parameter of the AA model |
| std | the standard deviation of the gaussian noise |
| proj | the simulated projection matrix. The dimension of the container give the dimension of the AA model. |
| data | the data to simulate. The dimension of the container give the number of the samples and variables. |
Definition at line 351 of file STK_LinearAAModel.h.
References _T, STK::gramSchmidt(), STK::LinearAAModel< Array >::simul(), stk_cout, and STKRUNTIME_ERROR_NO_ARG.
Referenced by STK::LinearAAModel< Array >::simul().
|
protected |
working data set;
Definition at line 196 of file STK_LinearAAModel.h.
Referenced by STK::LinearAAModel< Array >::LinearAAModel(), and STK::LinearAAModel< Array >::LinearAAModel().