48#ifdef STK_AAMODELS_VERBOSE
206 , p_workData_(p_workData)
214 , isStandardized_(false)
221 , p_workData_(&workData)
229 , isStandardized_(false)
248 p_workData_ = &workData;
250 isStandardized_ =
false;
257{ p_reducer_ = p_reducer;}
263{ p_regressor_ = p_regressor;}
269 if (p_reducer_)
delete p_reducer_;
276 if (p_regressor_)
delete p_regressor_;
284#ifdef STK_AAMODELS_DEBUG
302#ifdef STK_AAMODELS_DEBUG
321#ifdef STK_AAMODELS_DEBUG
329 isStandardized_ =
false;
332 isStandardized_ =
true;
339#ifdef STK_AAMODELS_DEBUG
347 isStandardized_ =
false;
351 isStandardized_ =
true;
359#ifdef STK_AAMODELS_DEBUG
364 p_reducer_->setDimension(dim_);
367 p_reduced_= p_reducer_->p_reduced();
374#ifdef STK_AAMODELS_DEBUG
379 p_reducer_->setDimension(dim_);
380 p_reducer_->run(weights);
382 p_reduced_= p_reducer_->p_reduced();
389#ifdef STK_AAMODELS_DEBUG
396 p_predicted_ = p_regressor_->p_predicted();
397 p_residuals_ = p_regressor_->p_residuals();
403#ifdef STK_AAMODELS_DEBUG
407 p_regressor_->run(weights);
409 p_predicted_ = p_regressor_->p_predicted();
410 p_residuals_ = p_regressor_->p_residuals();
417#ifdef STK_AAMODELS_DEBUG
427#ifdef STK_AAMODELS_DEBUG
A Array2DPoint is a one dimensional horizontal container.
A Array2DVector is a one dimensional horizontal container.
This file define methods for displaying Arrays and Expressions.
In this file we define the interface base class IReducer.
In this file we define the Interface base class IRegression.
#define STKRUNTIME_ERROR_NO_ARG(Where, Error)
In this file we specialize the class Multivariate to Real type.
Array * p_residuals_
Array of the residuals: the data set is shared with p_regressor and set when the regression method is...
void uncenterResults()
uncenter the predicted data set.
PointX const & std() const
int dim_
The dimension of the AA Model.
Reducer *const & p_reducer() const
bool isStandardized() const
IRegression< Array, Array, VectorX > Regressor
regression type
void freeRegressor()
delete the regressor set to this model by the method setRegressor.
Reducer * p_reducer_
pointer on the reeducer.
bool isStandardized_
a boolean true if the working data set is standardized, false otherwise
Array * p_workData_
Array of the local data set.
void reductionStep()
compute the reduction of the data set and store the result in the p_reduced_ container.
void setDimension(int const &dim)
Array * p_reduced_
Array of the reduced data set : the data set is shared with p_reducer and set when the regression met...
bool isCentered_
a boolean true if the working data set is centered, false otherwise.
void setRegressor(Regressor *p_regressor)
void setWorkData(Array &workData)
void unstandardizeResults()
unstandardize the predicted data set and the residuals.
void regressionStep()
compute the regression of the original data set and set the results in p_predicted and p_residuals.
Regressor * p_regressor_
pointer on the regression method.
PointX const & mean() const
Array *const & p_predicted() const
IAAModel(Array *p_workData)
Constructor.
PointX mean_
vector of the means of the input data set.
Array *const & p_reduced() const
void standardize()
standardize the data set.
Regressor *const & p_regressor() const
Array const & workData() const
IReducer< Array, VectorX > Reducer
reducer type
void center()
center the data set workData_.
Array *const & p_residuals() const
Array * p_predicted_
Array of the predicted data set: the data set is shared with p_regressor and set when the regression ...
PointX std_
vector of the standard deviation of the input data set.
void setReducer(Reducer *p_reducer)
void freeReducer()
delete the reducer set to this model by the method setReducer.
Interface base class for reducing methods.
Interface base class for Regression methods.
void center(Array &m, RowVector &mean)
Compute the mean by column of the variables in the container m and center it.
void unstandardize(Array &m, RowVector const &std)
undo the standardization by columns of the standardized variable m.
void standardize(Array &m, RowVector &mean, RowVector &std, bool unbiased=false)
Compute the mean and the standard deviation by columns of the variable m and standardize it.
void uncenter(Array &m, RowVector const &mean)
Add the means to the columns of the container m.
The namespace STK is the main domain space of the Statistical ToolKit project.