StreamingModel

Trait StreamingModel 

Source
pub trait StreamingModel: Send + Sync {
    // Required methods
    fn partial_fit(&mut self, x: &Array1<Float>, y: Float) -> Result<()>;
    fn predict(&self, x: &Array1<Float>) -> Result<Float>;
    fn get_performance(&self) -> Float;
    fn reset(&mut self) -> Result<()>;
    fn clone_model(&self) -> Box<dyn StreamingModel>;
}
Expand description

Trait for streaming models

Required Methods§

Source

fn partial_fit(&mut self, x: &Array1<Float>, y: Float) -> Result<()>

Incrementally update the model

Source

fn predict(&self, x: &Array1<Float>) -> Result<Float>

Predict a single sample

Source

fn get_performance(&self) -> Float

Get model’s recent performance

Source

fn reset(&mut self) -> Result<()>

Reset/reinitialize the model

Source

fn clone_model(&self) -> Box<dyn StreamingModel>

Clone the model

Implementors§