fuzzyclust.timeseries.embedding_scan#

fuzzyclust.timeseries.embedding_scan(y, dims=(1, 2, 3, 4, 5, 6), delay=1, n_clusters=10, train_fraction=0.7, random_state=None, **kwargs)[source]#

Fit ChaoticPredictor for several embedding dimensions and tabulate the criteria.

The correct embedding dimension is the smallest \(d_e\) after which the one-step prediction error stops decreasing (the ratio of consecutive errors approaches one), the local dimension the one where the prior-weighted smallest eigenvalue \(J^{d_e}\) collapses.

Parameters:
yarray_like of shape (T,)
dimssequence of int
delayint, default=1
n_clustersint, default=10
train_fractionfloat, default=0.7

The first part of the series is used for identification, the rest for the test error.

random_stateint, RandomState instance or None
**kwargs

Further parameters of ChaoticPredictor.

Returns:
tablepandas.DataFrame indexed by dim with columns

mse_train, mse_test, mse_ratio (test error of the previous dimension divided by the current one, the criterion of the paper: a ratio close to one means that the added coordinate does not help) and local_dimension_index (\(J^{d_e}\)).

Examples

>>> from fuzzyclust.timeseries import embedding_scan, make_mackey_glass
>>> x = make_mackey_glass(n_samples=800)
>>> table = embedding_scan(x, dims=(2, 3, 4), delay=6, n_clusters=4, random_state=0)
>>> list(table.columns)
['mse_train', 'mse_test', 'mse_ratio', 'local_dimension_index']

Examples using fuzzyclust.timeseries.embedding_scan#

State-space reconstruction and prediction of a chaotic time series

State-space reconstruction and prediction of a chaotic time series