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
ChaoticPredictorfor 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
ofshape(T,) - dimssequence
ofint - delay
int, default=1 - n_clusters
int, default=10 - train_fraction
float, default=0.7 The first part of the series is used for identification, the rest for the test error.
- random_state
int,RandomStateinstanceorNone - **kwargs
Further parameters of
ChaoticPredictor.
- yarray_like
- Returns:
- table
pandas.DataFrameindexedbydimwithcolumns 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) andlocal_dimension_index(\(J^{d_e}\)).
- table
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