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) |
int SCIPregressionGetNObservations | ( | SCIP_REGRESSION * | regression | ) |
returns the number of observations of this regression
regression | regression data structure |
Definition at line 242 of file misc.c.
References SCIP_Regression::nobservations.
Referenced by getCurrentRegressionTangentAxisIntercept().
SCIP_Real SCIPregressionGetSlope | ( | SCIP_REGRESSION * | regression | ) |
return the current slope of the regression
regression | regression data structure |
Definition at line 252 of file misc.c.
References SCIP_Regression::slope.
Referenced by getCurrentRegressionTangentAxisIntercept().
SCIP_Real SCIPregressionGetIntercept | ( | SCIP_REGRESSION * | regression | ) |
get the current y-intercept of the regression
regression | regression data structure |
Definition at line 262 of file misc.c.
References SCIP_Regression::intercept.
Referenced by getCurrentRegressionTangentAxisIntercept().
void SCIPregressionRemoveObservation | ( | SCIP_REGRESSION * | regression, |
SCIP_Real | x, | ||
SCIP_Real | y | ||
) |
removes an observation (x,y) from the regression
regression | regression data structure |
x | X of observation |
y | Y of the observation |
Definition at line 337 of file misc.c.
References FALSE, incrementalStatsUpdate(), SCIP_Regression::meanx, SCIP_Regression::meany, SCIP_Regression::nobservations, regressionRecompute(), SCIP_Bool, SCIPregressionReset(), SCIP_Regression::sumxy, SCIP_Regression::variancesumx, and SCIP_Regression::variancesumy.
Referenced by updateLogRegression().
void SCIPregressionAddObservation | ( | SCIP_REGRESSION * | regression, |
SCIP_Real | x, | ||
SCIP_Real | y | ||
) |
update regression by a new observation (x,y)
regression | regression data structure |
x | X of observation |
y | Y of the observation |
Definition at line 369 of file misc.c.
References incrementalStatsUpdate(), SCIP_Regression::meanx, SCIP_Regression::meany, SCIP_Regression::nobservations, regressionRecompute(), SCIP_Bool, SCIP_Regression::sumxy, TRUE, SCIP_Regression::variancesumx, and SCIP_Regression::variancesumy.
Referenced by solveNode(), and updateLogRegression().
void SCIPregressionReset | ( | SCIP_REGRESSION * | regression | ) |
reset regression data structure
regression | regression data structure |
Definition at line 388 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().
SCIP_RETCODE SCIPregressionCreate | ( | SCIP_REGRESSION ** | regression | ) |
creates and resets a regression
regression | regression data structure |
Definition at line 404 of file misc.c.
References BMSallocMemory, SCIP_ALLOC, SCIP_OKAY, and SCIPregressionReset().
Referenced by SCIPincludeEventHdlrSolvingphase(), and SCIPstatCreate().
void SCIPregressionFree | ( | SCIP_REGRESSION ** | regression | ) |
frees a regression
creates and resets a regression
regression | regression data structure |
Definition at line 420 of file misc.c.
References BMSfreeMemory.
Referenced by SCIP_DECL_EVENTFREE(), and SCIPstatFree().