Struct compute::predict::PolynomialRegressor [−][src]
Expand description
Implements a polynomial regressor.
In the case of a two coefficients, this reduces to simple linear regression, where the first parameter is the intercept, and the second is the slope.
Fields
coef: Vec<f64>
Implementations
Create a new polynomial regressor with degree deg
(e.g., deg = 1 is a linear model).
Returns c0 + c[1] * x + c[2] * x^2 ... + cn + x^n
, where c[i]
are the coefficients of the
polynomial regressor, and x
is some vector of explanatory variables. Evaluation is done
using Horner’s method.