pub trait PowerEstimator {
    // Required method
    fn model_power(
        &self,
        predictors: &[f64],
        outcomes: &[f64]
    ) -> PowerCoefficients;

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

Implemented by all estimators yielding a power regression.

Required Methods§

source

fn model_power(&self, predictors: &[f64], outcomes: &[f64]) -> PowerCoefficients

Model the PowerCoefficients from predictors and outcomes.

Panics

The two slices must have the same length.

Provided Methods§

source

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

source§

fn model_power(&self, predictors: &[f64], outcomes: &[f64]) -> PowerCoefficients

Implementors§

source§

impl PowerEstimator for std_dev::regression::binary_search::Options

source§

impl PowerEstimator for std_dev::regression::spiral::Options