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:
| Observation | Likely disturbance |
|---|---|
| Large λ + sustained outward drift | Drift |
| Abrupt step in ‖r‖ with sustained elevation | PersistentElevated |
| Single spike above ρ then return | Impulsive |
| Slowly increasing ‖r̈‖ trend | SlewRateBounded |
| Stationary bounded noise | PointwiseBounded |
Fields§
§excess_threshold: f32Threshold: normalised-excess (‖r‖−ρ)/ρ above which a sample is “notably outside.”
persistence_min: u32Minimum consecutive samples above threshold to classify as PersistentElevated.
drift_lambda_min: f32Lyapunov λ threshold below which Drift is not inferred.
Implementations§
Source§impl DisturbanceClassifier
impl DisturbanceClassifier
Sourcepub const fn default_rf() -> Self
pub const fn default_rf() -> Self
Construct with default RF thresholds.
Sourcepub fn classify(
&mut self,
norm: f32,
rho: f32,
lambda: f32,
dsa_fired: bool,
) -> Option<DisturbanceHypothesis>
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 radiuslambda: Lyapunov exponent fromlyapunovmodule (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.