Trait Classifier

Source
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§

Source

fn fit(arr: &Features, y: &[Label]) -> Option<Self>

Source

fn labels(&self) -> &[Label]

Source

fn predict_proba(&self, arr: &Features) -> Option<Array2<f64>>

Provided Methods§

Source

fn predict(&self, arr: &Features) -> Option<Vec<Label>>

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.

Implementors§

Source§

impl<Label: Eq + Clone> Classifier<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, Label> for GaussianNB<Label>