Skip to main content

Module features

Module features 

Source
Expand description

Temporal feature extraction functions for time-series data.

All functions operate on &[f64] slices and return Vec<f64>, using f64::NAN where values cannot be computed (e.g. boundary rows).

Functions§

diff
N-th order differencing.
ewm
Exponentially weighted mean with configurable alpha ∈ (0, 1].
lag
Lag: value offset rows earlier. Returns NAN for first offset rows.
pct_change
Percentage change: (values[i] - values[i-1]) / values[i-1]. First element is NAN. Returns NAN when values[i-1] is zero.
rolling_corr
Rolling Pearson correlation between two columns.
rolling_mean
Rolling arithmetic mean over a trailing window.
rolling_std
Rolling standard deviation using Welford’s online algorithm.
zscore
Z-score normalization: (value - mean) / std_dev.