AnomalyDetectorTrait

Trait AnomalyDetectorTrait 

Source
pub trait AnomalyDetectorTrait {
    // Required methods
    fn fit(&mut self, data: &Array2<f64>) -> Result<()>;
    fn detect(&self, data: &Array2<f64>) -> Result<AnomalyResult>;
    fn update(
        &mut self,
        data: &Array2<f64>,
        labels: Option<&Array1<i32>>,
    ) -> Result<()>;
    fn get_config(&self) -> String;
    fn get_type(&self) -> String;
}
Expand description

Trait for anomaly detection methods

Required Methods§

Source

fn fit(&mut self, data: &Array2<f64>) -> Result<()>

Train the detector on normal data

Source

fn detect(&self, data: &Array2<f64>) -> Result<AnomalyResult>

Detect anomalies in data

Source

fn update( &mut self, data: &Array2<f64>, labels: Option<&Array1<i32>>, ) -> Result<()>

Update detector with new data (online learning)

Source

fn get_config(&self) -> String

Get detector configuration

Source

fn get_type(&self) -> String

Get detector type

Implementors§