Detailed Description
methods for linear regression
Below are the public methods for incremental linear regression of observations pairs \((X_i,Y_i), i=1\dots,n\)
Functions | |
int | SCIPregressionGetNObservations (SCIP_REGRESSION *regression) |
SCIP_Real | SCIPregressionGetSlope (SCIP_REGRESSION *regression) |
SCIP_Real | SCIPregressionGetIntercept (SCIP_REGRESSION *regression) |
void | SCIPregressionRemoveObservation (SCIP_REGRESSION *regression, SCIP_Real x, SCIP_Real y) |
void | SCIPregressionAddObservation (SCIP_REGRESSION *regression, SCIP_Real x, SCIP_Real y) |
void | SCIPregressionReset (SCIP_REGRESSION *regression) |
SCIP_RETCODE | SCIPregressionCreate (SCIP_REGRESSION **regression) |
void | SCIPregressionFree (SCIP_REGRESSION **regression) |
Function Documentation
◆ SCIPregressionGetNObservations()
int SCIPregressionGetNObservations | ( | SCIP_REGRESSION * | regression | ) |
returns the number of observations of this regression
- Parameters
-
regression regression data structure
Definition at line 257 of file misc.c.
References SCIP_Regression::nobservations, and NULL.
Referenced by getCurrentRegressionTangentAxisIntercept().
◆ SCIPregressionGetSlope()
SCIP_Real SCIPregressionGetSlope | ( | SCIP_REGRESSION * | regression | ) |
return the current slope of the regression
- Parameters
-
regression regression data structure
Definition at line 267 of file misc.c.
References NULL, and SCIP_Regression::slope.
Referenced by getCurrentRegressionTangentAxisIntercept().
◆ SCIPregressionGetIntercept()
SCIP_Real SCIPregressionGetIntercept | ( | SCIP_REGRESSION * | regression | ) |
get the current y-intercept of the regression
- Parameters
-
regression regression data structure
Definition at line 277 of file misc.c.
References SCIP_Regression::intercept, and NULL.
Referenced by getCurrentRegressionTangentAxisIntercept().
◆ SCIPregressionRemoveObservation()
void SCIPregressionRemoveObservation | ( | SCIP_REGRESSION * | regression, |
SCIP_Real | x, | ||
SCIP_Real | y | ||
) |
removes an observation (x,y) from the regression
- Parameters
-
regression regression data structure x X of observation y Y of the observation
Definition at line 352 of file misc.c.
References FALSE, incrementalStatsUpdate(), SCIP_Regression::meanx, SCIP_Regression::meany, SCIP_Regression::nobservations, NULL, regressionRecompute(), SCIP_Bool, SCIPregressionReset(), SCIP_Regression::sumxy, SCIP_Regression::variancesumx, SCIP_Regression::variancesumy, x, and y.
Referenced by updateLogRegression().
◆ SCIPregressionAddObservation()
void SCIPregressionAddObservation | ( | SCIP_REGRESSION * | regression, |
SCIP_Real | x, | ||
SCIP_Real | y | ||
) |
update regression by a new observation (x,y)
- Parameters
-
regression regression data structure x X of observation y Y of the observation
Definition at line 384 of file misc.c.
References incrementalStatsUpdate(), SCIP_Regression::meanx, SCIP_Regression::meany, SCIP_Regression::nobservations, NULL, regressionRecompute(), SCIP_Bool, SCIP_Regression::sumxy, TRUE, SCIP_Regression::variancesumx, SCIP_Regression::variancesumy, x, and y.
Referenced by solveNode(), and updateLogRegression().
◆ SCIPregressionReset()
void SCIPregressionReset | ( | SCIP_REGRESSION * | regression | ) |
reset regression data structure
- Parameters
-
regression regression data structure
Definition at line 403 of file misc.c.
References SCIP_Regression::corrcoef, SCIP_Regression::intercept, SCIP_Regression::meanx, SCIP_Regression::meany, SCIP_Regression::nobservations, SCIP_INVALID, SCIP_Regression::slope, SCIP_Regression::sumxy, SCIP_Regression::variancesumx, and SCIP_Regression::variancesumy.
Referenced by SCIP_DECL_EVENTINIT(), SCIPregressionCreate(), SCIPregressionRemoveObservation(), and SCIPstatResetCurrentRun().
◆ SCIPregressionCreate()
SCIP_RETCODE SCIPregressionCreate | ( | SCIP_REGRESSION ** | regression | ) |
creates and resets a regression
- Parameters
-
regression regression data structure
Definition at line 419 of file misc.c.
References BMSallocMemory, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPregressionReset().
Referenced by SCIPincludeEventHdlrSolvingphase(), and SCIPstatCreate().
◆ SCIPregressionFree()
void SCIPregressionFree | ( | SCIP_REGRESSION ** | regression | ) |
frees a regression
creates and resets a regression
- Parameters
-
regression regression data structure
Definition at line 435 of file misc.c.
References BMSfreeMemory.
Referenced by SCIP_DECL_EVENTFREE(), and SCIPstatFree().