PredictionModel

pub trait PredictionModel: Debug {
    // Required methods
    fn predict<'life0, 'life1, 'async_trait>(
        &'life0 self,
        features: &'life1 HashMap<String, f64>,
        horizon: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<PredictionResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn train<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        training_data: &'life1 [TrainingDataPoint],
    ) -> Pin<Box<dyn Future<Output = Result<TrainingResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_model_accuracy(&self) -> f64;
}
Expand description

Trait for prediction models

Required Methods§

Source

fn predict<'life0, 'life1, 'async_trait>( &'life0 self, features: &'life1 HashMap<String, f64>, horizon: Duration, ) -> Pin<Box<dyn Future<Output = Result<PredictionResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn train<'life0, 'life1, 'async_trait>( &'life0 mut self, training_data: &'life1 [TrainingDataPoint], ) -> Pin<Box<dyn Future<Output = Result<TrainingResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_model_accuracy(&self) -> f64

Implementors§