pub trait Classifier<Features, Label: Eq + Clone>where
Self: Sized,{
// Required methods
fn fit(arr: &Features, y: &[Label]) -> Option<Self>;
fn labels(&self) -> &[Label];
fn predict_proba(&self, arr: &Features) -> Option<Array2<f64>>;
// Provided method
fn predict(&self, arr: &Features) -> Option<Vec<Label>> { ... }
}Required Methods§
fn fit(arr: &Features, y: &[Label]) -> Option<Self>
fn labels(&self) -> &[Label]
fn predict_proba(&self, arr: &Features) -> Option<Array2<f64>>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.