pub struct SrPoint {
pub index: usize,
pub value: f64,
pub saliency: f64,
pub score: f64,
pub expected: f64,
pub lower: f64,
pub upper: f64,
pub is_anomaly: bool,
pub near_edge: bool,
}Expand description
One scored point.
Fields§
§index: usizePosition in the input series.
value: f64The observed value.
saliency: f64Spectral residual saliency of the point (≥ 0).
score: f64Saliency relative to the preceding judgement window (≥ 0).
expected: f64Low-frequency reconstruction of the series with anomalies removed.
lower: f64expected − margin.
upper: f64expected + margin.
is_anomaly: boolscore > threshold and the value clears the z-score gate.
near_edge: boolThe point lies within κ = 5 places of an end of its batch, where the transform’s own boundary handling moves the saliency most.
The method extends the series by κ points before transforming, and the transform is circular, so that appended block sits next to the last points and the first ones. Measured on a noisy sawtooth of 200 points, replacing the predicted extension with the series’ real continuation moves the saliency of the five points at either end about eight times as much as it moves the middle – and the two ends by the same amount, which is why this is not a tail-only flag.
It is a property of the position, not a verdict: a real anomaly near an end is still reported as one. What it says is that a lone flag here is the one worth a second look, and an anomaly count is worth reporting with and without these.