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§
Sourcefn partial_fit(&mut self, x: &Array1<Float>, y: Float) -> Result<()>
fn partial_fit(&mut self, x: &Array1<Float>, y: Float) -> Result<()>
Incrementally update the model
Sourcefn get_performance(&self) -> Float
fn get_performance(&self) -> Float
Get model’s recent performance
Sourcefn clone_model(&self) -> Box<dyn StreamingModel>
fn clone_model(&self) -> Box<dyn StreamingModel>
Clone the model