Struct compute::predict::PolynomialRegressor[][src]

pub struct PolynomialRegressor {
    pub coef: Vec<f64>,
}
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.

Fit the polynomial regressor to some observed data y given some explanatory variables x. Uses least squares fitting.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.