Skip to main content

LearningAlgorithm

Trait LearningAlgorithm 

Source
pub trait LearningAlgorithm {
    // Required methods
    fn learn(&mut self, data: &[f64]) -> Result<(), Box<dyn Error>>;
    fn predict(&self, input: &[f64]) -> Result<f64, Box<dyn Error>>;
    fn get_confidence(&self) -> f64;
}
Expand description

Learning algorithm trait

Required Methods§

Source

fn learn(&mut self, data: &[f64]) -> Result<(), Box<dyn Error>>

Source

fn predict(&self, input: &[f64]) -> Result<f64, Box<dyn Error>>

Source

fn get_confidence(&self) -> f64

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§