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§
Sourcefn fit(&mut self, records: &[MetaTrainingRecord])
fn fit(&mut self, records: &[MetaTrainingRecord])
Fit on a training set. Replacing any prior state.
Sourcefn predict(&self, features: &CorpusFeatures) -> PipelineConfig
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.