1.2.0
CCC
 
Regression Class Reference

#include <Regression.hpp>

Inheritance diagram for Regression:
AStringable

Public Member Functions

 Regression ()
 
 Regression (const Regression &r)
 
Regressionoperator= (const Regression &r)
 
virtual ~Regression ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 Interface for AStringable. More...
 
void setCoeffs (VectorDouble coeffs)
 
void setCount (int count)
 
void setFlagCst (bool flagCst)
 
void setNvar (int nvar)
 
void setVariance (double variance)
 
void setVarres (double varres)
 
VectorDouble getCoeffs () const
 
double getCoeff (int i) const
 
int getNvar () const
 
int getCount () const
 
double getVariance () const
 
double getVarres () const
 
int apply (Db *db1, int iptr0, const String &nameResp, const VectorString &nameAux, int mode=0, bool flagCst=false, Db *db2=nullptr, const Model *model=nullptr)
 
- Public Member Functions inherited from AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (int level) const final
 

Constructor & Destructor Documentation

Regression::Regression ( )
Regression::Regression ( const Regression r)
Regression::~Regression ( )
virtual

Member Function Documentation

int Regression::apply ( Db db1,
int  iptr0,
const String nameResp,
const VectorString nameAux,
int  mode = 0,
bool  flagCst = false,
Db db2 = nullptr,
const Model model = nullptr 
)

Evaluate the regression

Returns
Error return code
Parameters
[in,out]db1Db descriptor (for target variable)
[in]iptr0Storing address (already allocated)
[in]nameRespName of the target variable
[in]nameAuxVector of names of the explanatory variables
[in]modeType of calculation
  • 0 : standard multivariate case
  • 1 : using external drifts
  • 2 : using standard drift functions (mode==2)
[in]flagCstThe constant is added as explanatory variable]
[in]db2Db descriptor (for auxiliary variables)
[in]modelModel descriptor
Remarks
The flag_mode indicates the type of regression calculation:
0 : V[icol] as a function of V[icols[i]]
1 : Z1 as a function of the different Fi's
The Db1 structure is modified: the column (iptr0) of the Db1
is added by this function; it contains the value
of the residuals at each datum (or TEST if the residual has not
been calculated).
double Regression::getCoeff ( int  i) const
inline
VectorDouble Regression::getCoeffs ( ) const
inline
int Regression::getCount ( ) const
inline
int Regression::getNvar ( ) const
inline
double Regression::getVariance ( ) const
inline
double Regression::getVarres ( ) const
inline
Regression & Regression::operator= ( const Regression r)
void Regression::setCoeffs ( VectorDouble  coeffs)
inline
void Regression::setCount ( int  count)
inline
void Regression::setFlagCst ( bool  flagCst)
inline
void Regression::setNvar ( int  nvar)
inline
void Regression::setVariance ( double  variance)
inline
void Regression::setVarres ( double  varres)
inline
String Regression::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Interface for AStringable.

Reimplemented from AStringable.


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