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 | |
SCIP_EXPORT int | SCIPregressionGetNObservations (SCIP_REGRESSION *regression) |
SCIP_EXPORT SCIP_Real | SCIPregressionGetSlope (SCIP_REGRESSION *regression) |
SCIP_EXPORT SCIP_Real | SCIPregressionGetIntercept (SCIP_REGRESSION *regression) |
SCIP_EXPORT void | SCIPregressionRemoveObservation (SCIP_REGRESSION *regression, SCIP_Real x, SCIP_Real y) |
SCIP_EXPORT void | SCIPregressionAddObservation (SCIP_REGRESSION *regression, SCIP_Real x, SCIP_Real y) |
SCIP_EXPORT void | SCIPregressionReset (SCIP_REGRESSION *regression) |
SCIP_EXPORT SCIP_RETCODE | SCIPregressionCreate (SCIP_REGRESSION **regression) |
SCIP_EXPORT void | SCIPregressionFree (SCIP_REGRESSION **regression) |
Function Documentation
◆ SCIPregressionGetNObservations()
SCIP_EXPORT int SCIPregressionGetNObservations | ( | SCIP_REGRESSION * | regression | ) |
returns the number of observations of this regression
- Parameters
-
regression regression data structure
Definition at line 243 of file misc.c.
References SCIP_Regression::nobservations, and NULL.
Referenced by getCurrentRegressionTangentAxisIntercept().
◆ SCIPregressionGetSlope()
SCIP_EXPORT SCIP_Real SCIPregressionGetSlope | ( | SCIP_REGRESSION * | regression | ) |
return the current slope of the regression
- Parameters
-
regression regression data structure
Definition at line 253 of file misc.c.
References NULL, and SCIP_Regression::slope.
Referenced by getCurrentRegressionTangentAxisIntercept().
◆ SCIPregressionGetIntercept()
SCIP_EXPORT SCIP_Real SCIPregressionGetIntercept | ( | SCIP_REGRESSION * | regression | ) |
get the current y-intercept of the regression
- Parameters
-
regression regression data structure
Definition at line 263 of file misc.c.
References SCIP_Regression::intercept, and NULL.
Referenced by getCurrentRegressionTangentAxisIntercept().
◆ SCIPregressionRemoveObservation()
SCIP_EXPORT 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 338 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, and y.
Referenced by updateLogRegression().
◆ SCIPregressionAddObservation()
SCIP_EXPORT 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 370 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, and y.
Referenced by solveNode(), and updateLogRegression().
◆ SCIPregressionReset()
SCIP_EXPORT void SCIPregressionReset | ( | SCIP_REGRESSION * | regression | ) |
reset regression data structure
- Parameters
-
regression regression data structure
Definition at line 389 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_EXPORT SCIP_RETCODE SCIPregressionCreate | ( | SCIP_REGRESSION ** | regression | ) |
creates and resets a regression
- Parameters
-
regression regression data structure
Definition at line 405 of file misc.c.
References BMSallocMemory, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPregressionReset().
Referenced by SCIPincludeEventHdlrSolvingphase(), and SCIPstatCreate().
◆ SCIPregressionFree()
SCIP_EXPORT void SCIPregressionFree | ( | SCIP_REGRESSION ** | regression | ) |
frees a regression
creates and resets a regression
- Parameters
-
regression regression data structure
Definition at line 421 of file misc.c.
References BMSfreeMemory.
Referenced by SCIP_DECL_EVENTFREE(), and SCIPstatFree().