# takens_embedding_optimal_parameters¶

gtda.time_series.takens_embedding_optimal_parameters(X, max_time_delay, max_dimension, stride=1, n_jobs=None, validate=True)[source]

Compute the “optimal” parameters for a Takens (time-delay) embedding 1 of a univariate time series.

First, an optimal time delay is found by minimising the time-delayed mutual information among values no greater than max_time_delay. Then, a heuristic based on an algorithm in 2 is used to select an embedding dimension which, when increased, does not reveal a large proportion of “false nearest neighbors”.

Parameters
• X (ndarray of shape (n_samples,) or (n_samples, 1)) – Input data representing a single univariate time series.

• max_time_delay (int, required) – Maximum time delay between two consecutive values for constructing one embedded point.

• max_dimension (int, required) – Maximum embedding dimension that will be considered in the optimization.

• stride (int, optional, default: 1) – Stride duration between two consecutive embedded points. It defaults to 1 as this is the usual value in the statement of Takens’s embedding theorem.

• n_jobs (int or None, optional, default: None) – The number of jobs to use for the computation. None means 1 unless in a joblib.parallel_backend context. -1 means using all processors.

• validate (bool, optional, default: True) – Whether the input and hyperparameters should be validated.

Returns

• time_delay (int) – The “optimal” time delay less than or equal to max_dimension, as determined by minimizing the time-delayed mutual information.

• dimension (int) – The “optimal” embedding dimension less than or equal to max_dimension, as determined by a false nearest neighbors heuristic once time_delay is computed.

References

1

F. Takens, “Detecting strange attractors in turbulence”. In: Rand D., Young LS. (eds) Dynamical Systems and Turbulence, Warwick 1980. Lecture Notes in Mathematics, vol. 898. Springer, 1981; DOI: 10.1007/BFb0091924.

2

M. B. Kennel, R. Brown, and H. D. I. Abarbanel, “Determining embedding dimension for phase-space reconstruction using a geometrical construction”; Phys. Rev. A 45, pp. 3403–3411, 1992; DOI: 10.1103/PhysRevA.45.3403.