pub struct AnomalyDetector {
pub z_threshold: f64,
pub iqr_multiplier: f64,
}Expand description
Anomaly detector using various statistical methods
Fields§
§z_threshold: f64Z-score threshold for detection
iqr_multiplier: f64IQR multiplier for detection
Implementations§
Source§impl AnomalyDetector
impl AnomalyDetector
Sourcepub fn new(z_threshold: f64, iqr_multiplier: f64) -> AnomalyDetector
pub fn new(z_threshold: f64, iqr_multiplier: f64) -> AnomalyDetector
Create a new anomaly detector with custom parameters
Sourcepub fn detect_zscore(
&self,
ts: &TimeSeries,
) -> Result<Vec<Anomaly>, TelemetryError>
pub fn detect_zscore( &self, ts: &TimeSeries, ) -> Result<Vec<Anomaly>, TelemetryError>
Detect anomalies using Z-score method
Sourcepub fn detect_iqr(
&self,
ts: &TimeSeries,
) -> Result<Vec<Anomaly>, TelemetryError>
pub fn detect_iqr( &self, ts: &TimeSeries, ) -> Result<Vec<Anomaly>, TelemetryError>
Detect anomalies using IQR (Interquartile Range) method
Sourcepub fn detect_moving_average(
&self,
ts: &TimeSeries,
window: usize,
) -> Result<Vec<Anomaly>, TelemetryError>
pub fn detect_moving_average( &self, ts: &TimeSeries, window: usize, ) -> Result<Vec<Anomaly>, TelemetryError>
Detect anomalies using moving average deviation
Sourcepub fn detect_ensemble(
&self,
ts: &TimeSeries,
) -> Result<Vec<Anomaly>, TelemetryError>
pub fn detect_ensemble( &self, ts: &TimeSeries, ) -> Result<Vec<Anomaly>, TelemetryError>
Detect anomalies using multiple methods and aggregate results
Trait Implementations§
Source§impl Debug for AnomalyDetector
impl Debug for AnomalyDetector
Source§impl Default for AnomalyDetector
impl Default for AnomalyDetector
Source§fn default() -> AnomalyDetector
fn default() -> AnomalyDetector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AnomalyDetector
impl RefUnwindSafe for AnomalyDetector
impl Send for AnomalyDetector
impl Sync for AnomalyDetector
impl Unpin for AnomalyDetector
impl UnwindSafe for AnomalyDetector
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