Movatterモバイル変換


[0]ホーム

URL:


Docs.rs

Cratehampel

Source
Expand description

Sequential outlier detection and removal using Hampel identifiers.

It supportsf32 andf64.

§Example

usehampel::Window;fnmain() {// Window size: 5 (>= 3)    // Initialization value of window: 0.0    // Threshold: Median of the window ±3σ.letmutfilter = Window::<f64,5>::new(0.0,3.0);letinput_vals = [0.0;100];// <- Containing outliersletmutfiltered_vals = [0.0;100];for(i, val)ininput_vals.iter().enumerate() {        filtered_vals[i] = filter.update(*val);    }// filtered_vals <-- Outliers have been removed}

Structs§

Window
Window of Hampel filter

[8]ページ先頭

©2009-2025 Movatter.jp