pub trait Classifier {
// Required methods
fn fit(&mut self, x: VR2D<'_>, labels: &[usize]) -> Result<(), ErrorsJSL>;
fn predict(&self, x: VR2D<'_>) -> Result<Vec<usize>, ErrorsJSL>;
}Expand description
A model mapping feature rows to class labels 0..classes.
Required Methods§
fn fit(&mut self, x: VR2D<'_>, labels: &[usize]) -> Result<(), ErrorsJSL>
fn predict(&self, x: VR2D<'_>) -> Result<Vec<usize>, ErrorsJSL>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".