pub trait PolynomialEstimator {
    // Required method
    fn model_polynomial(
        &self,
        predictors: &[f64],
        outcomes: &[f64],
        degree: usize
    ) -> PolynomialCoefficients;

    // Provided method
    fn boxed_polynomial(self) -> Box<dyn PolynomialEstimator>
       where Self: Sized + 'static { ... }
}
Available on crate feature regression only.
Expand description

Implemented by all estimators yielding a polynomial regression.

Required Methods§

source

fn model_polynomial( &self, predictors: &[f64], outcomes: &[f64], degree: usize ) -> PolynomialCoefficients

Model the PolynomialCoefficients from predictors and outcomes. Also takes a degree of the target polynomial. Some estimators may panic when degree is out of their range.

Panics

The two slices must have the same length.

Provided Methods§

source

fn boxed_polynomial(self) -> Box<dyn PolynomialEstimator>where Self: Sized + 'static,

Put this estimator in a box. This is useful for conditionally choosing different estimators.

Implementations on Foreign Types§

source§

impl<T: PolynomialEstimator + ?Sized> PolynomialEstimator for &T

source§

fn model_polynomial( &self, predictors: &[f64], outcomes: &[f64], degree: usize ) -> PolynomialCoefficients

Implementors§

source§

impl PolynomialEstimator for std_dev::regression::binary_search::Options

Available on crate feature binary_search_rng only.
source§

impl PolynomialEstimator for ParallelOptions

source§

impl PolynomialEstimator for SimultaneousOptions

source§

impl PolynomialEstimator for OlsEstimator

Available on crate feature ols only.
source§

impl PolynomialEstimator for std_dev::regression::spiral::Options

source§

impl PolynomialEstimator for PolynomialTheilSen