pyhctsa.operations.nonlinearity.delay_time¶
-
pyhctsa.operations.nonlinearity.delay_time(y, max_delay=
('ac', 10), past=('ac', 1), random_seed=0)¶ Optimal delay time using the method of Parlitz and Wichard.
For each of 256 reference points (spread evenly over the sorted values of the series by a deterministic low-discrepancy sequence), the nearest neighbors in value (one just below and one just above the reference value) are found. The absolute differences between the following values of each neighbor and the reference are summed over the two neighbors and averaged over the reference points, giving a curve
tauover delays 0, 1, …,max_delay(twice the mean separation of a neighbor from the reference).Method as implemented in the TSTOOL package for nonlinear time-series analysis (C. Merkwirth, U. Parlitz, I. Wedekind, D. Engster and W. Lauterborn; GNU GPL), here re-implemented through hctsa’s
NL_DelayTime.- Parameters:¶
- y : array-like¶
Input time series.
- max_delay=
('ac', 10)¶ Maximum value of the delay to consider.
['ac', k]sets it toktimes the first zero-crossing of the autocorrelation function (seepyhctsa.utils.theiler_window()). Values in (0, 1) are interpreted as a proportion of the time-series length (legacy). Delays below 10 are raised to 10, and a delay too long for the series (at leastN/2) is shortened toceil(N/2) - 1(NaN only if that is below 10). Default is['ac', 10].- past=
('ac', 1)¶ Number of time-correlated points to discard (samples) when searching for value-neighbors, i.e., the Theiler window: a number of samples, or
['ac', k]forktimes the autocorrelation time (['ac1e', k]is also accepted). Default is['ac', 1].- random_seed : int, str or None, optional¶
Not used: the 256 reference points are deterministic (the golden-ratio sequence over the sorted values), as in hctsa. Kept so that existing calls still work.
- Returns:¶
The first three values of
tau, the differences between them, and the mean, standard deviation, minimum and maximum oftau. Returns NaN if an autocorrelation-basedmax_delayorpastcannot be set (the ACF never crosses zero), if the series is too short for a delay of 10, or if no reference point clears the Theiler window.- Return type:¶
dict