Skip to main content

Detector

Trait Detector 

Source
pub trait Detector: Send {
    // Required methods
    fn name() -> &'static str
       where Self: Sized;
    fn new(n_dimensions: usize) -> Self
       where Self: Sized;
    fn update(&mut self, point: &[f32]) -> f32;
}
Expand description

Streaming detector interface used by Touchstone during evaluation.

update is called once per point and should return an anomaly score. Returning NaN is allowed (for example during warmup).

Required Methods§

Source

fn name() -> &'static str
where Self: Sized,

Display name used in the results DataFrame and comparison tables.

Source

fn new(n_dimensions: usize) -> Self
where Self: Sized,

Initialize a new detector given the dimensionality of the stream.

Source

fn update(&mut self, point: &[f32]) -> f32

Updates detector state with the next point and returns a score.

Implementors§