StreamingTransformer

Trait StreamingTransformer 

Source
pub trait StreamingTransformer: Send + Sync {
    // Required methods
    fn partial_fit(&mut self, x: &Array2<f64>) -> Result<()>;
    fn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>>;
    fn reset(&mut self);
    fn n_samples_seen(&self) -> usize;
}
Expand description

Trait for transformers that support streaming/incremental updates

Required Methods§

Source

fn partial_fit(&mut self, x: &Array2<f64>) -> Result<()>

Update the transformer with a new batch of data

Source

fn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>>

Transform a batch of data using current statistics

Source

fn reset(&mut self)

Reset the transformer to initial state

Source

fn n_samples_seen(&self) -> usize

Get the number of samples seen so far

Implementors§