fuzzyclust.timeseries.select_delay#

fuzzyclust.timeseries.select_delay(y, max_lag=100, method='mutual_information', n_bins=16)[source]#

Lag \(\tau\) of the delay embedding from the series itself.

Two classical rules are offered: the first minimum of the average mutual information \(I(\tau)=\sum p(y_k,y_{k-\tau})\log\frac{p(y_k,y_{k-\tau})}{p(y_k)p(y_{k-\tau})}\) (Fraser & Swinney, estimated on a n_bins\(\times\)n_bins histogram) and the first zero crossing of the autocorrelation function. If no minimum or zero is found within max_lag, max_lag is returned.

Examples

>>> import numpy as np
>>> from fuzzyclust.timeseries import select_delay
>>> y = np.sin(2 * np.pi * np.arange(1000) / 40.0)
>>> select_delay(y, max_lag=30, method="autocorrelation")
10

Examples using fuzzyclust.timeseries.select_delay#

State-space reconstruction and prediction of a chaotic time series

State-space reconstruction and prediction of a chaotic time series