Linear regression using polynomials as regression function: f(x) = a + bx + cx^2 + ....
| Function or value | Description |
Full Usage:
coefficient order xData yData
Parameters:
int
-
order of the polynomial (1 = linear, 2 = quadratic, ... )
xData : Vector<float>
-
vector of x values
yData : Vector<float>
-
vector of y values
Returns: Vector<float>
vector of polynomial coefficients sorted as [intercept;constant;quadratic;...]
|
Example
|
Full Usage:
coefficientsWithWeighting order weighting xData yData
Parameters:
int
-
order of the polynomial (1 = linear, 2 = quadratic, ... )
weighting : Vector<float>
-
Vector of weightings that define the releveance of each point for fitting.
xData : Vector<float>
-
vector of x values
yData : Vector<float>
-
vector of y values
Returns: Vector<float>
vector of polynomial coefficients sorted as [intercept;constant;quadratic;...]
|
Example
|
|
Fits a polynomial model of user defined order to the data and returns the cooks distance for every data pair present in the input collections as an estimator for the influence of each data point in coefficient estimation.
Example
|
Full Usage:
fit order coef x
Parameters:
int
-
order of the polynomial (1 = linear, 2 = quadratic, ... )
coef : Vector<float>
-
vector of polynomial coefficients (e.g. determined by Polynomial.coefficients), sorted as [intercept;constant;quadratic;...]
x : float
-
x value of which the corresponding y value should be predicted
Returns: float
predicted y value with given polynomial coefficients at X=x
|
If all coefficients are nonzero, the order is equal to the length of the coefficient vector!
Example
|
Full Usage:
getDerivative coef level x
Parameters:
Vector<float>
-
vector of polynomial coefficients (e.g. determined by Polynomial.coefficients), sorted as [intercept;constant;quadratic;...]
level : int
-
depth of derivative: 1 = slope, 2 = curvature, ...
x : float
-
x value of which the corresponding y value should be predicted
Returns: float
predicted derivative with given polynomial coefficients at X=x
|
calculates derivative values at X=x with given polynomial coefficients. Level 1 = fst derivative; Level2 = snd derivative ...
Example
|