pub struct AdaptiveThreshold {
pub base: ThresholdRange,
pub std_dev_multiplier: f64,
pub history: Vec<f64>,
pub config: ThresholdConfig,
}Expand description
Adaptive threshold that learns from historical data.
Fields§
§base: ThresholdRange§std_dev_multiplier: f64§history: Vec<f64>§config: ThresholdConfigImplementations§
Source§impl AdaptiveThreshold
impl AdaptiveThreshold
pub fn new(config: ThresholdConfig) -> Self
pub fn is_warmed_up(&self) -> bool
pub fn update(&mut self, value: f64)
pub fn current_range(&self) -> ThresholdRange
pub fn check(&self, value: f64) -> ThresholdResult
Trait Implementations§
Source§impl Clone for AdaptiveThreshold
impl Clone for AdaptiveThreshold
Source§impl Debug for AdaptiveThreshold
impl Debug for AdaptiveThreshold
Source§impl<'de> Deserialize<'de> for AdaptiveThreshold
impl<'de> Deserialize<'de> for AdaptiveThreshold
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
Auto Trait Implementations§
impl Freeze for AdaptiveThreshold
impl RefUnwindSafe for AdaptiveThreshold
impl Send for AdaptiveThreshold
impl Sync for AdaptiveThreshold
impl Unpin for AdaptiveThreshold
impl UnsafeUnpin for AdaptiveThreshold
impl UnwindSafe for AdaptiveThreshold
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