pub enum AnomalySignal {
PriceDrift {
ratio: f64,
},
ListingReorder {
jaccard: f64,
},
Staleness {
age_secs: i64,
},
Outlier {
z_score: f64,
},
CardinalityShift {
from: usize,
to: usize,
},
None,
}Expand description
The five anomaly kinds the detector emits.
Variants§
PriceDrift
Numeric value lies more than k * IQR from the rolling
median. ratio is the observed / median ratio.
ListingReorder
Ordered-list Jaccard distance vs the previous ordering is
above the threshold. jaccard is the distance in [0.0, 1.0].
Staleness
Timestamp is older than the staleness threshold. age_secs
is now - observed.
Outlier
Numeric z-score across the rolling window exceeds the outlier threshold (default 3.0).
CardinalityShift
Text-field unique-value count changed by more than the cardinality-shift threshold (default 50%) between windows.
None
No anomaly — included for completeness so callers can use a single return type.
Trait Implementations§
Source§impl Clone for AnomalySignal
impl Clone for AnomalySignal
Source§fn clone(&self) -> AnomalySignal
fn clone(&self) -> AnomalySignal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnomalySignal
impl Debug for AnomalySignal
Source§impl<'de> Deserialize<'de> for AnomalySignal
impl<'de> Deserialize<'de> for AnomalySignal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AnomalySignal
impl PartialEq for AnomalySignal
Source§fn eq(&self, other: &AnomalySignal) -> bool
fn eq(&self, other: &AnomalySignal) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AnomalySignal
impl Serialize for AnomalySignal
impl StructuralPartialEq for AnomalySignal
Auto Trait Implementations§
impl Freeze for AnomalySignal
impl RefUnwindSafe for AnomalySignal
impl Send for AnomalySignal
impl Sync for AnomalySignal
impl Unpin for AnomalySignal
impl UnsafeUnpin for AnomalySignal
impl UnwindSafe for AnomalySignal
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