pub trait LinearEstimator {
    // Required method
    fn model_linear(
        &self,
        predictors: &[f64],
        outcomes: &[f64]
    ) -> LinearCoefficients;

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

Implemented by all estimators yielding a linear 2 variable regression (a line).

Required Methods§

source

fn model_linear( &self, predictors: &[f64], outcomes: &[f64] ) -> LinearCoefficients

Model the LinearCoefficients from predictors and outcomes.

Panics

The two slices must have the same length.

Provided Methods§

source

fn boxed_linear(self) -> Box<dyn LinearEstimator>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: LinearEstimator + ?Sized> LinearEstimator for &T

source§

fn model_linear( &self, predictors: &[f64], outcomes: &[f64] ) -> LinearCoefficients

Implementors§

source§

impl LinearEstimator for std_dev::regression::binary_search::Options

source§

impl LinearEstimator for ParallelOptions

source§

impl LinearEstimator for SimultaneousOptions

source§

impl LinearEstimator for OlsEstimator

Available on crate feature ols only.
source§

impl LinearEstimator for std_dev::regression::spiral::Options

source§

impl LinearEstimator for LinearTheilSen

source§

impl<F: Fn(&LinearCoefficients, &[f64], &[f64]) -> f64> LinearEstimator for SpiralLinear<F>