Skip to main content

Module timeseries

Module timeseries 

Source
Expand description

Time-series kernels — autocorrelation, moving average, exponential smoothing.

The canonical home for the elementary time-series transforms used by the domain libraries (specialized_libs::statistical_computing). Like the rest of solvers::statistics, these operate over caller-owned slices; the series-producing transforms write into a caller-provided out slice and return the number of elements written (mirroring histogram_into), so no allocation is imposed by this layer.

Functions§

autocorrelation
Sample autocorrelation at lag, using the standard biased estimator (normalised by the total sum of squares, mean-centred):
exponential_smoothing_into
Single (Brown’s) exponential smoothing with factor alpha ∈ (0, 1], written into out (same length as values).
moving_average_into
Simple moving average with the given window, written into out.