Skip to main content

Module time_series_analysis

Module time_series_analysis 

Source
Expand description

Time-series analysis utilities: statistics, filtering, autocorrelation, trend decomposition, spectral analysis, change-point detection, and AR models.

Structs§

ArModel
Autoregressive model of order p.
Autocorrelation
Autocorrelation function (ACF) estimator.
ChangePointDetection
CUSUM-based change-point detector.
CrossCorrelation
Cross-correlation estimator for two equal-length signals.
Periodogram
Lomb-Scargle periodogram for unevenly-sampled data.
TimeSeries
A time series with optional explicit timestamps.
TimeSeriesStats
Descriptive statistics computed over a TimeSeries.

Enums§

TimeSeriesFilter
Filter types available through apply_filter.

Functions§

adf_test
Simplified Augmented Dickey-Fuller test for stationarity.
apply_filter
Apply a TimeSeriesFilter to data and return the filtered signal.
compute_power_spectrum
Compute the one-sided power spectral density via a direct DFT.
compute_stats
Compute descriptive statistics for a TimeSeries.
decompose_trend
Classical additive decomposition of a time series into trend, seasonal, and residual components.
ema
Compute an exponential moving average with smoothing factor alpha ∈ (0, 1].
find_peaks
Find local maxima whose prominence exceeds min_prominence.
hurst_exponent
Estimate the Hurst exponent of a time series using R/S (rescaled range) analysis.
interpolate_linear
Fill NaN values in data using linear interpolation between the nearest valid neighbours. Leading and trailing NaNs are filled with the first / last valid value respectively.
interpolate_spline
Fill NaN values in data using simple cubic-spline-like interpolation (Catmull-Rom tangents) between the nearest valid neighbours.
moving_average
Compute a centred (symmetric) simple moving average.
zero_crossing_rate
Compute the zero-crossing rate: fraction of consecutive-sample sign changes.