pub trait Predictive {
    // Required method
    fn predict_outcome(&self, predictor: f64) -> f64;

    // Provided method
    fn boxed(self) -> DynModel
       where Self: Sized + Display + 'static { ... }
}
Available on crate feature regression only.
Expand description

Something that can predict the outcome from a predictor.

Required Methods§

source

fn predict_outcome(&self, predictor: f64) -> f64

Calculates the predicted outcome of predictor.

Provided Methods§

source

fn boxed(self) -> DynModelwhere Self: Sized + Display + 'static,

Put this predicative model in a box. This is useful for conditionally choosing different models.

Implementations on Foreign Types§

source§

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

source§

fn predict_outcome(&self, predictor: f64) -> f64

Implementors§