Skip to main content

MetaModel

Trait MetaModel 

Source
pub trait MetaModel {
    // Required methods
    fn fit(&mut self, records: &[MetaTrainingRecord]);
    fn predict(&self, features: &CorpusFeatures) -> PipelineConfig;
    fn name(&self) -> &str;
}
Expand description

Predicts a PipelineConfig from a CorpusFeatures profile.

Implementers fit on a training set of MetaTrainingRecords (pairs of (features, best_config) observed from past tuner runs) and predict a config for a new corpus.

Required Methods§

Source

fn fit(&mut self, records: &[MetaTrainingRecord])

Fit on a training set. Replacing any prior state.

Source

fn predict(&self, features: &CorpusFeatures) -> PipelineConfig

Predict the config that should work best on a corpus with the given profile. Panics if fit has not been called with at least one record — callers should treat MetaModel as a trained object and front-load fit.

Source

fn name(&self) -> &str

Short name for logs and model comparison.

Implementors§