pub struct ConformalAlert { /* private fields */ }Expand description
Conformal alert threshold calibrator with e-process control.
Implementations§
Source§impl ConformalAlert
impl ConformalAlert
Sourcepub fn new(config: AlertConfig) -> Self
pub fn new(config: AlertConfig) -> Self
Create a new conformal alerter with given configuration.
Sourcepub fn calibrate(&mut self, value: f64)
pub fn calibrate(&mut self, value: f64)
Add a calibration sample.
Call this during the baseline/training phase to build the null distribution.
Sourcepub fn observe(&mut self, value: f64) -> AlertDecision
pub fn observe(&mut self, value: f64) -> AlertDecision
Observe a new value and return alert decision with evidence.
Sourcepub fn reset_eprocess(&mut self)
pub fn reset_eprocess(&mut self)
Reset the e-process state (but keep calibration).
Sourcepub fn clear_calibration(&mut self)
pub fn clear_calibration(&mut self)
Clear calibration data.
Sourcepub fn stats(&self) -> AlertStats
pub fn stats(&self) -> AlertStats
Get current statistics.
Sourcepub fn logs(&self) -> &[AlertEvidence]
pub fn logs(&self) -> &[AlertEvidence]
Get evidence logs (if logging enabled).
Sourcepub fn clear_logs(&mut self)
pub fn clear_logs(&mut self)
Clear evidence logs.
Sourcepub fn calibration_count(&self) -> usize
pub fn calibration_count(&self) -> usize
Number of calibration samples.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConformalAlert
impl RefUnwindSafe for ConformalAlert
impl Send for ConformalAlert
impl Sync for ConformalAlert
impl Unpin for ConformalAlert
impl UnsafeUnpin for ConformalAlert
impl UnwindSafe for ConformalAlert
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