pub trait Predictable<X, Y> {
    // Required method
    fn predict(&self, x: &ArrayView2<'_, X>) -> Result<Array1<Y>, String>;
}
Expand description

Trait for objects that can make predictions

Required Methods§

source

fn predict(&self, x: &ArrayView2<'_, X>) -> Result<Array1<Y>, String>

Makes predictions on the provided data using the trained SVMClassifier.

Arguments
  • x - A 2D array of data to make predictions on.
Returns

A Result containing an error string if prediction fails, or a 1D array of predictions if prediction succeeds.

Implementors§

source§

impl Predictable<f32, bool> for SVMClassifier<f32, bool>

source§

impl<X, Y> Predictable<X, Y> for BayesClassifier<X, Y>where X: Float, Y: Label,

source§

impl<X, Y> Predictable<X, Y> for RandomForestClassifier<X, Y>where X: Number + FloatNumber + PartialOrd, Y: Number + Ord,

source§

impl<X, Y, C1, C2> Predictable<X, Y> for CombinedClassifier<X, Y, C1, C2>where X: Float, Y: Label + Copy, C1: Classifier<X, Y>, C2: Classifier<X, Y>,