SAGA API  v9.5
CSG_Regression_Multiple Class Reference

#include <mat_tools.h>

Public Member Functions

 CSG_Regression_Multiple (bool bIntercept=true)
 
virtual ~CSG_Regression_Multiple (void)
 
void Destroy (void)
 
bool Set_Data (const CSG_Matrix &Samples, CSG_Strings *pNames=NULL)
 
void Set_With_Intercept (bool bOn=true)
 
bool Get_With_Intercept (void) const
 
bool Get_Model (const CSG_Matrix &Samples, CSG_Strings *pNames=NULL)
 
bool Get_Model_Forward (const CSG_Matrix &Samples, double P_in, CSG_Strings *pNames=NULL)
 
bool Get_Model_Backward (const CSG_Matrix &Samples, double P_out, CSG_Strings *pNames=NULL)
 
bool Get_Model_Stepwise (const CSG_Matrix &Samples, double P_in, double P_out, CSG_Strings *pNames=NULL)
 
bool Get_Model (void)
 
bool Get_Model_Forward (double P_in)
 
bool Get_Model_Backward (double P_out)
 
bool Get_Model_Stepwise (double P_in, double P_out)
 
bool Get_CrossValidation (int nSubSamples=0)
 
CSG_String Get_Info (void) const
 
class CSG_TableGet_Info_Regression (void) const
 
class CSG_TableGet_Info_Model (void) const
 
class CSG_TableGet_Info_Steps (void) const
 
double Get_R2 (void) const
 
double Get_R2_Adj (void) const
 
double Get_StdError (void) const
 
double Get_F (void) const
 
double Get_P (void) const
 
double Get_CV_RMSE (void) const
 
double Get_CV_NRMSE (void) const
 
double Get_CV_R2 (void) const
 
int Get_CV_nSamples (void) const
 
int Get_DegFreedom (void) const
 
int Get_nSamples (void) const
 
int Get_nPredictors (void) const
 
int Get_Predictor (int i) const
 
double Get_RConst (void) const
 
const SG_CharGet_Name (int iVariable) const
 
double Get_ID (int iVariable) const
 
double Get_RCoeff (int iVariable) const
 
double Get_R2_Partial (int iVariable) const
 
double Get_R2_Partial_Adj (int iVariable) const
 
double Get_StdError (int iVariable) const
 
double Get_T (int iVariable) const
 
double Get_P (int iVariable) const
 
double Get_Parameter (int iVariable, int Parameter) const
 
double Get_Value (const CSG_Vector &Predictors) const
 
bool Get_Value (const CSG_Vector &Predictors, double &Value) const
 
double Get_Residual (int iSample) const
 
bool Get_Residual (int iSample, double &Residual) const
 
bool Get_Residuals (CSG_Vector &Residuals) const
 

Protected Member Functions

bool _Initialize (bool bInclude)
 
double _Get_F (int nPredictors, int nSamples, double r2_full, double r2_reduced)
 
double _Get_P (int nPredictors, int nSamples, double r2_full, double r2_reduced)
 
bool _Get_Regression (const class CSG_Matrix &Samples)
 
int _Get_Step_In (CSG_Matrix &X, double P_in, double &R2, const CSG_Matrix &Samples)
 
int _Get_Step_Out (CSG_Matrix &X, double P_out, double &R2)
 
bool _Set_Step_Info (const CSG_Matrix &X)
 
bool _Set_Step_Info (const CSG_Matrix &X, double R2_prev, int iVariable, bool bIn)
 

Protected Attributes

bool m_bIntercept
 
int * m_bIncluded
 
int * m_Predictor
 
int m_nPredictors
 
CSG_Strings m_Names
 
CSG_Matrix m_Samples
 
CSG_Matrix m_Samples_Model
 
class CSG_Tablem_pRegression
 
class CSG_Tablem_pModel
 
class CSG_Tablem_pSteps
 

Detailed Description

Definition at line 1692 of file mat_tools.h.

Constructor & Destructor Documentation

◆ CSG_Regression_Multiple()

◆ ~CSG_Regression_Multiple()

CSG_Regression_Multiple::~CSG_Regression_Multiple ( void  )
virtual

Definition at line 181 of file mat_regression_multiple.cpp.

References Destroy(), m_pModel, m_pRegression, and m_pSteps.

Member Function Documentation

◆ _Get_F()

double CSG_Regression_Multiple::_Get_F ( int  nPredictors,
int  nSamples,
double  r2_full,
double  r2_reduced 
)
inlineprotected

Definition at line 563 of file mat_regression_multiple.cpp.

Referenced by _Get_P(), and _Set_Step_Info().

◆ _Get_P()

double CSG_Regression_Multiple::_Get_P ( int  nPredictors,
int  nSamples,
double  r2_full,
double  r2_reduced 
)
inlineprotected

◆ _Get_Regression()

◆ _Get_Step_In()

int CSG_Regression_Multiple::_Get_Step_In ( CSG_Matrix X,
double  P_in,
double &  R2,
const CSG_Matrix Samples 
)
protected

◆ _Get_Step_Out()

int CSG_Regression_Multiple::_Get_Step_Out ( CSG_Matrix X,
double  P_out,
double &  R2 
)
protected

◆ _Initialize()

◆ _Set_Step_Info() [1/2]

◆ _Set_Step_Info() [2/2]

◆ Destroy()

◆ Get_CrossValidation()

◆ Get_CV_NRMSE()

double CSG_Regression_Multiple::Get_CV_NRMSE ( void  ) const

◆ Get_CV_nSamples()

int CSG_Regression_Multiple::Get_CV_nSamples ( void  ) const

◆ Get_CV_R2()

double CSG_Regression_Multiple::Get_CV_R2 ( void  ) const

◆ Get_CV_RMSE()

double CSG_Regression_Multiple::Get_CV_RMSE ( void  ) const

◆ Get_DegFreedom()

int CSG_Regression_Multiple::Get_DegFreedom ( void  ) const

Definition at line 875 of file mat_regression_multiple.cpp.

References Get_nPredictors(), and Get_nSamples().

Referenced by Get_Info().

◆ Get_F()

double CSG_Regression_Multiple::Get_F ( void  ) const

◆ Get_ID()

double CSG_Regression_Multiple::Get_ID ( int  iVariable) const
inline

Definition at line 1738 of file mat_tools.h.

References MLR_VAR_ID.

◆ Get_Info()

◆ Get_Info_Model()

class CSG_Table* CSG_Regression_Multiple::Get_Info_Model ( void  ) const
inline

Definition at line 1719 of file mat_tools.h.

◆ Get_Info_Regression()

class CSG_Table* CSG_Regression_Multiple::Get_Info_Regression ( void  ) const
inline

Definition at line 1718 of file mat_tools.h.

◆ Get_Info_Steps()

class CSG_Table* CSG_Regression_Multiple::Get_Info_Steps ( void  ) const
inline

Definition at line 1720 of file mat_tools.h.

◆ Get_Model() [1/2]

bool CSG_Regression_Multiple::Get_Model ( const CSG_Matrix Samples,
CSG_Strings pNames = NULL 
)

◆ Get_Model() [2/2]

bool CSG_Regression_Multiple::Get_Model ( void  )

Definition at line 318 of file mat_regression_multiple.cpp.

References _Get_Regression(), _Initialize(), and m_Samples.

Referenced by Get_Model().

◆ Get_Model_Backward() [1/2]

bool CSG_Regression_Multiple::Get_Model_Backward ( const CSG_Matrix Samples,
double  P_out,
CSG_Strings pNames = NULL 
)

Definition at line 307 of file mat_regression_multiple.cpp.

References Set_Data().

◆ Get_Model_Backward() [2/2]

bool CSG_Regression_Multiple::Get_Model_Backward ( double  P_out)

◆ Get_Model_Forward() [1/2]

bool CSG_Regression_Multiple::Get_Model_Forward ( const CSG_Matrix Samples,
double  P_in,
CSG_Strings pNames = NULL 
)

Definition at line 302 of file mat_regression_multiple.cpp.

References Set_Data().

◆ Get_Model_Forward() [2/2]

bool CSG_Regression_Multiple::Get_Model_Forward ( double  P_in)

◆ Get_Model_Stepwise() [1/2]

bool CSG_Regression_Multiple::Get_Model_Stepwise ( const CSG_Matrix Samples,
double  P_in,
double  P_out,
CSG_Strings pNames = NULL 
)

Definition at line 312 of file mat_regression_multiple.cpp.

References Set_Data().

◆ Get_Model_Stepwise() [2/2]

bool CSG_Regression_Multiple::Get_Model_Stepwise ( double  P_in,
double  P_out 
)

◆ Get_Name()

const SG_Char * CSG_Regression_Multiple::Get_Name ( int  iVariable) const

◆ Get_nPredictors()

int CSG_Regression_Multiple::Get_nPredictors ( void  ) const

◆ Get_nSamples()

int CSG_Regression_Multiple::Get_nSamples ( void  ) const

◆ Get_P() [1/2]

double CSG_Regression_Multiple::Get_P ( int  iVariable) const
inline

Definition at line 1744 of file mat_tools.h.

References MLR_VAR_SIG.

◆ Get_P() [2/2]

double CSG_Regression_Multiple::Get_P ( void  ) const

◆ Get_Parameter()

double CSG_Regression_Multiple::Get_Parameter ( int  iVariable,
int  Parameter 
) const

◆ Get_Predictor()

int CSG_Regression_Multiple::Get_Predictor ( int  i) const
inline

Definition at line 1734 of file mat_tools.h.

◆ Get_R2()

double CSG_Regression_Multiple::Get_R2 ( void  ) const

◆ Get_R2_Adj()

double CSG_Regression_Multiple::Get_R2_Adj ( void  ) const

◆ Get_R2_Partial()

double CSG_Regression_Multiple::Get_R2_Partial ( int  iVariable) const
inline

Definition at line 1740 of file mat_tools.h.

References MLR_VAR_R2.

◆ Get_R2_Partial_Adj()

double CSG_Regression_Multiple::Get_R2_Partial_Adj ( int  iVariable) const
inline

Definition at line 1741 of file mat_tools.h.

References MLR_VAR_R2_ADJ.

◆ Get_RCoeff()

double CSG_Regression_Multiple::Get_RCoeff ( int  iVariable) const
inline

Definition at line 1739 of file mat_tools.h.

References MLR_VAR_RCOEFF.

Referenced by Get_Info(), Get_Residual(), and Get_Value().

◆ Get_RConst()

double CSG_Regression_Multiple::Get_RConst ( void  ) const

◆ Get_Residual() [1/2]

double CSG_Regression_Multiple::Get_Residual ( int  iSample) const

Definition at line 518 of file mat_regression_multiple.cpp.

Referenced by Get_Residuals().

◆ Get_Residual() [2/2]

bool CSG_Regression_Multiple::Get_Residual ( int  iSample,
double &  Residual 
) const

◆ Get_Residuals()

bool CSG_Regression_Multiple::Get_Residuals ( CSG_Vector Residuals) const

◆ Get_StdError() [1/2]

double CSG_Regression_Multiple::Get_StdError ( int  iVariable) const
inline

Definition at line 1742 of file mat_tools.h.

References MLR_VAR_SE.

◆ Get_StdError() [2/2]

double CSG_Regression_Multiple::Get_StdError ( void  ) const

◆ Get_T()

double CSG_Regression_Multiple::Get_T ( int  iVariable) const
inline

Definition at line 1743 of file mat_tools.h.

References MLR_VAR_T.

◆ Get_Value() [1/2]

double CSG_Regression_Multiple::Get_Value ( const CSG_Vector Predictors) const

Definition at line 493 of file mat_regression_multiple.cpp.

Referenced by Get_CrossValidation().

◆ Get_Value() [2/2]

bool CSG_Regression_Multiple::Get_Value ( const CSG_Vector Predictors,
double &  Value 
) const

◆ Get_With_Intercept()

bool CSG_Regression_Multiple::Get_With_Intercept ( void  ) const
inline

Definition at line 1703 of file mat_tools.h.

◆ Set_Data()

◆ Set_With_Intercept()

void CSG_Regression_Multiple::Set_With_Intercept ( bool  bOn = true)
inline

Definition at line 1702 of file mat_tools.h.

Member Data Documentation

◆ m_bIncluded

int* CSG_Regression_Multiple::m_bIncluded
protected

Definition at line 1761 of file mat_tools.h.

Referenced by _Get_Step_In(), _Get_Step_Out(), _Initialize(), Destroy(), and Set_Data().

◆ m_bIntercept

bool CSG_Regression_Multiple::m_bIntercept
protected

◆ m_Names

CSG_Strings CSG_Regression_Multiple::m_Names
protected

Definition at line 1763 of file mat_tools.h.

Referenced by _Get_Regression(), _Set_Step_Info(), Destroy(), and Set_Data().

◆ m_nPredictors

int CSG_Regression_Multiple::m_nPredictors
protected

◆ m_pModel

◆ m_Predictor

int * CSG_Regression_Multiple::m_Predictor
protected

◆ m_pRegression

class CSG_Table* CSG_Regression_Multiple::m_pRegression
protected

◆ m_pSteps

class CSG_Table * CSG_Regression_Multiple::m_pSteps
protected

◆ m_Samples

CSG_Matrix CSG_Regression_Multiple::m_Samples
protected

◆ m_Samples_Model

CSG_Matrix CSG_Regression_Multiple::m_Samples_Model
protected

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