Class for doing a quick and dirty regression of order 2 only returning the parameters A0, A1 and A2 as regression parameters. Can not handle too big or too small input values.
Constructor | Description |
Full Usage:
QuickQuadraticRegression()
|
|
Instance member | Description |
Full Usage:
this.Add
Parameters:
float
-
The x value of the data point.
y : float
-
The y value of the data point.
|
Adds a data point to the regression.
|
|
Adds data points to the statistics.
|
Full Usage:
this.GetA0
Returns: float
The intercept value or NaN if not enough data points are entered.
|
Gets the intercept value of the regression. Returns NaN if not enough data points entered.
|
Full Usage:
this.GetA1
Returns: float
The slope value or NaN if not enough data points are entered.
|
Gets the slope value of the regression. Returns NaN if not enough data points entered.
|
Full Usage:
this.GetA2
Returns: float
The slope value or NaN if not enough data points are entered.
|
Gets the quadratic parameter of the regression. Returns NaN if not enough data points entered.
|
Full Usage:
this.GetDeterminant
Returns: float
The determinant of the regression.
|
Returns the determinant of regression. If zero, not enough data points have been entered.
|
Full Usage:
this.GetYOfX
Parameters:
float
-
The x value.
Returns: float
The y value at the value x.
|
Gets the y value for a given x value. Note that in every call of this function the polynomial coefficients a0, a2, and a1 are calculated again. For repeated calls, better use QuickQuadraticRegression.GetYOfXFunction, but note that this function represents the state of the regression at the time of this call.
|
Full Usage:
this.GetYOfXFunction
Returns: Func<float, float>
A function to calculate y in dependence of x.
|
Returns a function to calculate y in dependence of x. Please note note that the returned function represents the state of the regression at the time of the call, i.e. subsequent additions of data does not change the function.
|