std_dev::regression::trig

Trait CosecantEstimator

source
pub trait CosecantEstimator {
    // Required method
    fn model_cosecant(
        &self,
        predictors: &[f64],
        outcomes: &[f64],
        max_frequency: f64,
    ) -> CosecantCoefficients;

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

Implemented by all estimators yielding a cosecant function.

Required Methods§

source

fn model_cosecant( &self, predictors: &[f64], outcomes: &[f64], max_frequency: f64, ) -> CosecantCoefficients

Model the CosecantCoefficients from predictors and outcomes.

§Panics

The two slices must have the same length.

Provided Methods§

source

fn boxed_cosecant(self) -> Box<dyn CosecantEstimator>
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: CosecantEstimator + ?