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 smoothing factor 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 over a trailing window, pairwise-complete.
rolling_mean
Rolling arithmetic mean of the non-NULL values in a trailing window.
rolling_std
Rolling sample standard deviation of the non-NULL values in a trailing window, by Welford’s algorithm.
zscore
Z-score normalisation against the partition’s own mean and sample standard deviation.