pyhctsa.operations.stationarity.ramping_windows

pyhctsa.operations.stationarity.ramping_windows(y, num_seg=10)

Monotonic trend (‘ramping’) in windowed statistics.

Splits the time series into num_seg non-overlapping segments, computes the mean, variance, skewness, kurtosis, and lag-1 autocorrelation (AC1) within each segment, and quantifies whether each of these quantities trends monotonically across the segments (e.g., a variance that ramps up steadily across the series, rather than merely fluctuating).

Parameters:
y : array-like

The input time series.

num_seg : int, optional

The number of non-overlapping segments to divide the time series into. Non-overlapping segments are used deliberately (rather than sliding_window()’s overlapping windows): overlap between windows would induce artificial serial correlation between adjacent window-statistics, which would inflate the apparent monotonic trend independent of any real ramping in the data. Default is 10.

Returns:

Kendall’s tau and Pearson’s r (each with its p-value) between segment index and each windowed statistic. Returns NaN if the time series is too short for the requested number of segments.

Return type:

dict