alloc only.Expand description
Unified streaming learner trait for polymorphic model composition.
StreamingLearner is an object-safe trait that abstracts over any
online/streaming machine learning model – gradient boosted trees, linear
models, Naive Bayes, Mondrian forests, or anything else that can ingest
samples one at a time and produce predictions.
§Motivation
Stacking ensembles and meta-learners need to treat heterogeneous base
models uniformly: train them on the same stream, collect their predictions
as features for a combiner, and manage their lifecycle (reset, clone,
serialization). StreamingLearner provides exactly this interface.
§Object Safety
The trait is deliberately object-safe: every method uses &self /
&mut self with concrete return types (no generics on methods, no
Self-by-value in non-Sized positions). This means you can store
Box<dyn StreamingLearner> in a Vec, enabling runtime-polymorphic
stacking without monomorphization.
Traits§
- Streaming
Learner - Object-safe trait for any streaming (online) machine learning model.