pyhctsa.operations.nonlinearity.zero_one_test

pyhctsa.operations.nonlinearity.zero_one_test(y, num_c=20, max_n=10000)

Modified 0-1 test for chaos.

Parameters:
y : array_like

Input scalar time series.

num_c : int, default=20

Number of frequencies c over which the statistics are computed.

max_n : int or "full", default=10000

Maximum number of samples to analyze. If “full”, use the complete time series.

Returns:

out –

Kfloat

Median correlation statistic across frequencies.

Kstdfloat

Standard deviation of K across frequencies.

Dfloat

Median diffusion rate across frequencies.

Dstdfloat

Standard deviation of D across frequencies.

Return type:

dict

Notes

K ~ 0 indicates bounded/regular dynamics, whereas K ~ 1 indicates unbounded dynamics. Unbounded dynamics may be deterministic chaos or stochastic noise; the 0-1 test alone does not distinguish them.

K tends to 1 for any input whose power spectrum is continuous at the frequencies c, noise included, so K separates regular from irregular dynamics and indicates chaos only when the input is known to be deterministic.

The statistics use lags 1..N//10, so the test needs N >= 20, and K (a correlation over the lags) N >= 30. On short series K is not on its 0-1 scale: regular dynamics whose frequencies fall in the range of c (e.g. a period-3 orbit, or quasi-periodic signals) give K close to 1 up to N ~ 100-300, although K still ranks regular below irregular dynamics.