pub trait ModelFactory: Send + Sync {
// Required methods
fn config_space(&self) -> ConfigSpace;
fn create(&self, config: &HyperConfig) -> Box<dyn StreamingLearner>;
fn name(&self) -> &str;
// Provided methods
fn warmup_hint(&self) -> usize { ... }
fn complexity_hint(&self) -> usize { ... }
}Expand description
Factory for creating streaming learner instances from hyperparameter configurations.
Implementations define the hyperparameter search space and how to construct a model from a given configuration point.
Required Methods§
Sourcefn config_space(&self) -> ConfigSpace
fn config_space(&self) -> ConfigSpace
The hyperparameter search space for this model type.
Sourcefn create(&self, config: &HyperConfig) -> Box<dyn StreamingLearner>
fn create(&self, config: &HyperConfig) -> Box<dyn StreamingLearner>
Create a new model instance from a hyperparameter configuration.
The config values correspond to the parameters in config_space().
Provided Methods§
Sourcefn warmup_hint(&self) -> usize
fn warmup_hint(&self) -> usize
Minimum samples a new model needs before its metrics are meaningful.
Candidates that have seen fewer than warmup_hint() samples are
protected from elimination during tournament rounds. This prevents
neural architectures with warmup phases (ESN, Mamba, SpikeNet) from
being prematurely killed by models that start predicting immediately.
The default is 0 (no warmup protection).
Sourcefn complexity_hint(&self) -> usize
fn complexity_hint(&self) -> usize
Approximate model complexity (effective parameter count).
Used for complexity-adjusted elimination: models with higher complexity are penalized more when evaluation data is scarce. This naturally favors simpler models on sparse data and lets complex models prove themselves when data is abundant.
The default is 100 (moderate complexity).