Class for doing a quick and dirty regression of order 1 only returning intercept and slope. Can not handle too big or too input values.
Constructor | Description |
Full Usage:
QuickLinearRegression()
|
|
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 linear 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 linear 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.GetX0
Returns: float
The intercept value with the X-Axis, i.e. the point where the regression value is zero. Returns NaN if not enough data points are entered.
|
Gets the intercept of the linear regression with the X-axis. Returns NaN if not enough data points 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 coefficients a0 and a1 are calculated again. For repeated calls, better use QuickLinearRegression.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.
|
Full Usage:
this.MeanX
Returns: float
|
|
Full Usage:
this.MeanY
Returns: float
|
|
Full Usage:
this.N
Returns: float
|
Returns the number of entries added.
|
Full Usage:
this.PearsonCorrelationCoefficient
Returns: float
|
|