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§
Sourcefn partial_fit(&mut self, x: &Array2<f64>) -> Result<()>
fn partial_fit(&mut self, x: &Array2<f64>) -> Result<()>
Update the transformer with a new batch of data
Sourcefn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>>
fn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>>
Transform a batch of data using current statistics
Sourcefn n_samples_seen(&self) -> usize
fn n_samples_seen(&self) -> usize
Get the number of samples seen so far