pub struct SpotDetector { /* private fields */ }Expand description
Main SPOT detector for streaming anomaly detection
Implementations§
Source§impl SpotDetector
impl SpotDetector
Sourcepub fn new(config: SpotConfig) -> SpotResult<Self>
pub fn new(config: SpotConfig) -> SpotResult<Self>
Create a new SPOT detector with the given configuration
Sourcepub fn fit(&mut self, data: &[f64]) -> SpotResult<()>
pub fn fit(&mut self, data: &[f64]) -> SpotResult<()>
Fit the model using initial training data
Sourcepub fn step(&mut self, value: f64) -> SpotResult<SpotStatus>
pub fn step(&mut self, value: f64) -> SpotResult<SpotStatus>
Process a single data point and return its classification
Sourcepub fn probability(&self, z: f64) -> f64
pub fn probability(&self, z: f64) -> f64
Get the probability for a given value
Sourcepub fn anomaly_threshold(&self) -> f64
pub fn anomaly_threshold(&self) -> f64
Get the current anomaly threshold
Sourcepub fn excess_threshold(&self) -> f64
pub fn excess_threshold(&self) -> f64
Get the current excess threshold
Sourcepub fn config(&self) -> Option<SpotConfig>
pub fn config(&self) -> Option<SpotConfig>
Get the current configuration (reconstructed)
Sourcepub fn tail_parameters(&self) -> (f64, f64)
pub fn tail_parameters(&self) -> (f64, f64)
Get the current tail parameters
Sourcepub fn peaks_mean(&self) -> f64
pub fn peaks_mean(&self) -> f64
Get the mean of the peaks
Sourcepub fn peaks_variance(&self) -> f64
pub fn peaks_variance(&self) -> f64
Get the variance of the peaks
Sourcepub fn peaks_data(&self) -> Vec<f64>
pub fn peaks_data(&self) -> Vec<f64>
Get the peaks data as a vector (for debugging and export)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpotDetector
impl RefUnwindSafe for SpotDetector
impl Send for SpotDetector
impl Sync for SpotDetector
impl Unpin for SpotDetector
impl UnwindSafe for SpotDetector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more