pub struct DeltaAnalyzer {
pub significance_threshold: f32,
}Expand description
Delta analyzer for detecting deviations from baseline.
Fields§
§significance_threshold: f32Z-score threshold for significance.
Implementations§
Source§impl DeltaAnalyzer
impl DeltaAnalyzer
Sourcepub fn with_threshold(threshold: f32) -> Self
pub fn with_threshold(threshold: f32) -> Self
Create analyzer with custom threshold.
Sourcepub fn analyze(
&self,
baseline: &Baseline,
features: &LinguisticFeatures,
) -> DeltaSignals
pub fn analyze( &self, baseline: &Baseline, features: &LinguisticFeatures, ) -> DeltaSignals
Analyze a message against the baseline.
Returns delta signals (z-scores) for each metric. Positive z-score = higher than usual, negative = lower than usual.
Sourcepub fn analyze_and_update(
&self,
baseline: &mut Baseline,
features: &LinguisticFeatures,
) -> DeltaSignals
pub fn analyze_and_update( &self, baseline: &mut Baseline, features: &LinguisticFeatures, ) -> DeltaSignals
Analyze and update baseline in one step.
Analyzes against current baseline, then adds to baseline.
Sourcepub fn to_axis_adjustments(
&self,
signals: &DeltaSignals,
) -> Vec<(&'static str, f32)>
pub fn to_axis_adjustments( &self, signals: &DeltaSignals, ) -> Vec<(&'static str, f32)>
Map delta signals to axis adjustments.
Returns (axis_name, adjustment) pairs where adjustment is in [-0.3, 0.3].
Trait Implementations§
Source§impl Clone for DeltaAnalyzer
impl Clone for DeltaAnalyzer
Source§fn clone(&self) -> DeltaAnalyzer
fn clone(&self) -> DeltaAnalyzer
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 DeltaAnalyzer
impl Debug for DeltaAnalyzer
Source§impl Default for DeltaAnalyzer
impl Default for DeltaAnalyzer
Source§fn default() -> DeltaAnalyzer
fn default() -> DeltaAnalyzer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeltaAnalyzer
impl RefUnwindSafe for DeltaAnalyzer
impl Send for DeltaAnalyzer
impl Sync for DeltaAnalyzer
impl Unpin for DeltaAnalyzer
impl UnsafeUnpin for DeltaAnalyzer
impl UnwindSafe for DeltaAnalyzer
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