pub trait MLBackend {
// Required methods
fn name(&self) -> &'static str;
fn predict(
&self,
model: &DeepModel,
ctx: &ExecutionContext,
) -> MLResult<PredictResult>;
fn predict_features(
&self,
model: &DeepModel,
examples: &[(DocId, Vec<f64>)],
) -> MLResult<PredictResult>;
fn deep_learn(
&self,
training_set: &TrainingSet,
options: &LearnOptions,
) -> MLResult<DeepLearnOutput>;
}Required Methods§
fn name(&self) -> &'static str
fn predict( &self, model: &DeepModel, ctx: &ExecutionContext, ) -> MLResult<PredictResult>
fn predict_features( &self, model: &DeepModel, examples: &[(DocId, Vec<f64>)], ) -> MLResult<PredictResult>
fn deep_learn( &self, training_set: &TrainingSet, options: &LearnOptions, ) -> MLResult<DeepLearnOutput>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".