SAGA API v9.10
Loading...
Searching...
No Matches
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 1708 of file mat_tools.h.

Constructor & Destructor Documentation

◆ CSG_Regression_Multiple()

CSG_Regression_Multiple::CSG_Regression_Multiple ( bool bIntercept = true)

◆ ~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()

◆ _Get_Step_Out()

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

◆ _Initialize()

bool CSG_Regression_Multiple::_Initialize ( bool bInclude)
protected

◆ _Set_Step_Info() [1/2]

◆ _Set_Step_Info() [2/2]

◆ Destroy()

void CSG_Regression_Multiple::Destroy ( void )

◆ Get_CrossValidation()

◆ Get_CV_NRMSE()

double CSG_Regression_Multiple::Get_CV_NRMSE ( void ) const

Definition at line 870 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_CV_NRMSE.

◆ Get_CV_nSamples()

int CSG_Regression_Multiple::Get_CV_nSamples ( void ) const

Definition at line 872 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_CV_NSAMPLES.

◆ Get_CV_R2()

double CSG_Regression_Multiple::Get_CV_R2 ( void ) const

Definition at line 871 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_CV_R2.

◆ Get_CV_RMSE()

double CSG_Regression_Multiple::Get_CV_RMSE ( void ) const

Definition at line 869 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_CV_RMSE.

◆ 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

Definition at line 867 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_F.

Referenced by Get_Info().

◆ Get_ID()

double CSG_Regression_Multiple::Get_ID ( int iVariable) const
inline

Definition at line 1754 of file mat_tools.h.

References Get_Parameter(), and MLR_VAR_ID.

◆ Get_Info()

◆ Get_Info_Model()

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

Definition at line 1735 of file mat_tools.h.

References m_pModel.

◆ Get_Info_Regression()

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

Definition at line 1734 of file mat_tools.h.

References m_pRegression.

◆ Get_Info_Steps()

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

Definition at line 1736 of file mat_tools.h.

References m_pSteps.

◆ 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 Get_Model_Backward(), and Set_Data().

Referenced by Get_Model_Backward().

◆ 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 Get_Model_Forward(), and Set_Data().

Referenced by Get_Model_Forward().

◆ 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 Get_Model_Stepwise(), and Set_Data().

Referenced by Get_Model_Stepwise().

◆ 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

Definition at line 878 of file mat_regression_multiple.cpp.

References m_pRegression, MLR_VAR_NAME, SG_Char, and SG_T.

◆ Get_nPredictors()

int CSG_Regression_Multiple::Get_nPredictors ( void ) const

Definition at line 873 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_NPREDICT.

Referenced by Get_DegFreedom(), Get_Info(), and Get_Predictor().

◆ Get_nSamples()

int CSG_Regression_Multiple::Get_nSamples ( void ) const

Definition at line 874 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_NSAMPLES.

Referenced by Get_DegFreedom().

◆ Get_P() [1/2]

double CSG_Regression_Multiple::Get_P ( int iVariable) const
inline

Definition at line 1760 of file mat_tools.h.

References Get_Parameter(), and MLR_VAR_SIG.

◆ Get_P() [2/2]

double CSG_Regression_Multiple::Get_P ( void ) const

Definition at line 868 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_SIG.

Referenced by Get_Info().

◆ 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 1750 of file mat_tools.h.

References Get_nPredictors(), and m_Predictor.

◆ Get_R2()

double CSG_Regression_Multiple::Get_R2 ( void ) const

Definition at line 864 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_R2.

Referenced by _Get_Step_In(), _Get_Step_Out(), _Set_Step_Info(), and Get_Info().

◆ Get_R2_Adj()

double CSG_Regression_Multiple::Get_R2_Adj ( void ) const

Definition at line 865 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_R2_ADJ.

Referenced by _Set_Step_Info(), and Get_Info().

◆ Get_R2_Partial()

double CSG_Regression_Multiple::Get_R2_Partial ( int iVariable) const
inline

Definition at line 1756 of file mat_tools.h.

References Get_Parameter(), and MLR_VAR_R2.

◆ Get_R2_Partial_Adj()

double CSG_Regression_Multiple::Get_R2_Partial_Adj ( int iVariable) const
inline

Definition at line 1757 of file mat_tools.h.

References Get_Parameter(), and MLR_VAR_R2_ADJ.

◆ Get_RCoeff()

double CSG_Regression_Multiple::Get_RCoeff ( int iVariable) const
inline

Definition at line 1755 of file mat_tools.h.

References Get_Parameter(), and MLR_VAR_RCOEFF.

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

◆ Get_RConst()

double CSG_Regression_Multiple::Get_RConst ( void ) const

Definition at line 889 of file mat_regression_multiple.cpp.

References m_pRegression, and MLR_VAR_RCOEFF.

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

◆ Get_Residual() [1/2]

double CSG_Regression_Multiple::Get_Residual ( int iSample) const

Definition at line 518 of file mat_regression_multiple.cpp.

References Get_Residual().

Referenced by Get_Residual(), and 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 1758 of file mat_tools.h.

References Get_Parameter(), and MLR_VAR_SE.

◆ Get_StdError() [2/2]

double CSG_Regression_Multiple::Get_StdError ( void ) const

Definition at line 866 of file mat_regression_multiple.cpp.

References m_pModel, and MLR_MODEL_SE.

Referenced by _Set_Step_Info(), and Get_Info().

◆ Get_T()

double CSG_Regression_Multiple::Get_T ( int iVariable) const
inline

Definition at line 1759 of file mat_tools.h.

References Get_Parameter(), and 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.

References Get_Value().

Referenced by Get_CrossValidation(), and Get_Value().

◆ 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 1719 of file mat_tools.h.

References m_bIntercept.

◆ Set_Data()

◆ Set_With_Intercept()

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

Definition at line 1718 of file mat_tools.h.

References m_bIntercept.

Member Data Documentation

◆ m_bIncluded

int* CSG_Regression_Multiple::m_bIncluded
protected

Definition at line 1777 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 1779 of file mat_tools.h.

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

◆ m_nPredictors

◆ 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: