Skip to main content

DisturbanceClassifier

Struct DisturbanceClassifier 

Source
pub struct DisturbanceClassifier {
    pub excess_threshold: f32,
    pub persistence_min: u32,
    pub drift_lambda_min: f32,
    /* private fields */
}
Expand description

Heuristic disturbance classifier.

Given observable quantities from the grammar/DSA/Lyapunov pipeline, produces a candidate RfDisturbance hypothesis with a confidence score.

This is a structural classifier — it operates on the shape of the residual trajectory, not on modulation features. It is therefore modulation-agnostic by construction.

§Decision rules

The rules are derived from the DDMF disturbance model signatures:

ObservationLikely disturbance
Large λ + sustained outward driftDrift
Abrupt step in ‖r‖ with sustained elevationPersistentElevated
Single spike above ρ then returnImpulsive
Slowly increasing ‖r̈‖ trendSlewRateBounded
Stationary bounded noisePointwiseBounded

Fields§

§excess_threshold: f32

Threshold: normalised-excess (‖r‖−ρ)/ρ above which a sample is “notably outside.”

§persistence_min: u32

Minimum consecutive samples above threshold to classify as PersistentElevated.

§drift_lambda_min: f32

Lyapunov λ threshold below which Drift is not inferred.

Implementations§

Source§

impl DisturbanceClassifier

Source

pub const fn default_rf() -> Self

Construct with default RF thresholds.

Source

pub fn classify( &mut self, norm: f32, rho: f32, lambda: f32, dsa_fired: bool, ) -> Option<DisturbanceHypothesis>

Classify one observation.

  • norm: current ‖r(k)‖
  • rho: admissibility envelope radius
  • lambda: Lyapunov exponent from lyapunov module (pass 0.0 if unknown)
  • dsa_fired: whether the DSA motif-fired flag is active

Returns Some(DisturbanceHypothesis) when a classification is made; None during nominal operation.

Source

pub fn reset(&mut self)

Reset internal state.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.