1.5.1
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 (const 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) const
 
- 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() [1/2]

Regression::Regression ( )

◆ Regression() [2/2]

Regression::Regression ( const Regression r)

◆ ~Regression()

Regression::~Regression ( )
virtual

Member Function Documentation

◆ apply()

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 
) const

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).

◆ getCoeff()

double Regression::getCoeff ( int  i) const
inline

◆ getCoeffs()

VectorDouble Regression::getCoeffs ( ) const
inline

◆ getCount()

int Regression::getCount ( ) const
inline

◆ getNvar()

int Regression::getNvar ( ) const
inline

◆ getVariance()

double Regression::getVariance ( ) const
inline

◆ getVarres()

double Regression::getVarres ( ) const
inline

◆ operator=()

Regression & Regression::operator= ( const Regression r)

◆ setCoeffs()

void Regression::setCoeffs ( const VectorDouble coeffs)
inline

◆ setCount()

void Regression::setCount ( int  count)
inline

◆ setFlagCst()

void Regression::setFlagCst ( bool  flagCst)
inline

◆ setNvar()

void Regression::setNvar ( int  nvar)
inline

◆ setVariance()

void Regression::setVariance ( double  variance)
inline

◆ setVarres()

void Regression::setVarres ( double  varres)
inline

◆ toString()

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: