pyhctsa.operations.nonlinearity.tisean_d2¶
-
pyhctsa.operations.nonlinearity.tisean_d2(y, tau=
1, maxm=10, theiler_win=('ac', 1))¶ Correlation dimension and entropy from the TISEAN package’s
d2routine.Estimates the correlation sum, the correlation dimension and the correlation entropy of the time series [1], then summarises the results.
Takens’ estimator is computed for the correlation dimension, at a fixed upper length scale of 0.5 standard deviations (the estimator is a reasonable dimension estimate when evaluated at the upper end of the scaling range [1]), along with related statistics: other dimension estimates obtained by finding suitable scaling ranges (with a Theiler window [2]), and a search for a flat region in the output of TISEAN’s
h2algorithm, which indicates determinism/deterministic chaos [3].To find a suitable scaling range, a penalized regression procedure is used to determine an optimal scaling range that simultaneously spans the greatest range of scales and shows the best fit to the data, and return the range, a goodness of fit statistic, and a dimension estimate.
Unlike hctsa, which shells out to installed TISEAN binaries, this runs the vendored TISEAN sources in-process (see
pyhctsa.toolboxes.Tisean_3_0_1.tisean).References
- Parameters:¶
- y : array-like¶
Input time series.
- tau : int or str, optional¶
The time-delay: an integer, or a rule understood by
pyhctsa.utils.get_tau().'ac'is the first zero-crossing of the autocorrelation function,'ac1e'the (floored) first 1/e crossing of the autocorrelation function, and'mi'the smaller of the first minimum of the (Kraskov) automutual information and the 1/e time. Default is 1.- maxm : int, optional¶
The maximum embedding dimension. Default is 10.
- theiler_win=
('ac', 1)¶ The Theiler window (see
pyhctsa.utils.theiler_window()): a number of samples,['ac', k]forktimes the first zero-crossing of the autocorrelation function (['ac1e', k]is also accepted), or a value in(0, 1)taken as a proportion of the time-series length (legacy). Default is['ac', 1].
- Returns:¶
Statistics summarising Takens’ estimator, the local slopes of the correlation sum (raw and Gaussian-kernel smoothed), and the correlation entropy. The ten
takens05outputs summarise Takens’ estimator at the first length scale above 0.5 over the embedding dimensionsm = 1, ..., m_vat which it rests on at least 33 pairs of delay vectors within that scale (the number of pairs falls withm;m_vis the last such dimension, and stops before any estimate above2m). With fewer pairs the estimate is set by a handful of pairs in the few occupied radii of the correlation sum and is not a dimension estimate (33 is the smallest number of pairs for which the 95% sampling interval of Takens’ estimator, for independent pairs, spans less than a factor of two). An estimate above2mis not a dimension estimate either: a set with a scaling region below the length scale has a dimension of at mostm, and larger values arise when the correlation sum rises much faster thanr^m, as in nonstationary series. All ten are NaN if fewer than two dimensions qualify. The*mmin_*outputs (the smallest embedding dimension from which a quantity is roughly constant, and its goodness, stable value and linear-fit error) are NaN when the quantity is the same at every dimension, to within round-off, since it cannot then be rescaled. Returns NaN, as hctsa does, if the time series is too short, the time delay cannot be determined, or the TISEAN output is unusable for this series (no valid output for a long delay, no correlation-dimension data, or no scaling range).- Return type:¶
dict or float