1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::Regression Class Reference

#include <Regression.hpp>

Inheritance diagram for gstlrn::Regression:
gstlrn::AStringable

Public Member Functions

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

Constructor & Destructor Documentation

◆ Regression() [1/2]

gstlrn::Regression::Regression ( )

◆ Regression() [2/2]

gstlrn::Regression::Regression ( const Regression r)

◆ ~Regression()

gstlrn::Regression::~Regression ( )
virtual

Member Function Documentation

◆ apply()

Id gstlrn::Regression::apply ( Db db1,
Id  iptr0,
const String nameResp,
const VectorString nameAux,
Id  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 gstlrn::Regression::getCoeff ( Id  i) const
inline

◆ getCoeffs()

gstlrn::Regression::getCoeffs ( ) const
inline

◆ getCount()

Id gstlrn::Regression::getCount ( ) const
inline

◆ getNvar()

Id gstlrn::Regression::getNvar ( ) const
inline

◆ getVariance()

double gstlrn::Regression::getVariance ( ) const
inline

◆ getVarres()

double gstlrn::Regression::getVarres ( ) const
inline

◆ operator=()

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

◆ setCoeffs()

void gstlrn::Regression::setCoeffs ( const 1 &  coeffs)
inline

◆ setCount()

void gstlrn::Regression::setCount ( Id  count)
inline

◆ setFlagCst()

void gstlrn::Regression::setFlagCst ( bool  flagCst)
inline

◆ setNvar()

void gstlrn::Regression::setNvar ( Id  nvar)
inline

◆ setVariance()

void gstlrn::Regression::setVariance ( double  variance)
inline

◆ setVarres()

void gstlrn::Regression::setVarres ( double  varres)
inline

◆ toString()

String gstlrn::Regression::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Interface for AStringable.

Reimplemented from gstlrn::AStringable.


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