Skip to main content

Module streaming

Module streaming 

Source
Expand description

Streaming data adapter for incremental learning.

The StreamingFitter feeds batches from an iterator to a PartialFit model, enabling online/streaming learning workflows where the full dataset does not fit in memory.

§Example

use ferrolearn_core::streaming::StreamingFitter;

// Assume `model` implements PartialFit<Array2<f64>, Array1<f64>>
let batches = vec![
    (x_batch1, y_batch1),
    (x_batch2, y_batch2),
];

let fitter = StreamingFitter::new(model).n_epochs(3);
let fitted = fitter.fit_batches(batches)?;
let predictions = fitted.predict(&x_test)?;

Structs§

StreamingFitter
Feeds batches from an iterator to a PartialFit model.