fuzzyclust.timeseries#
Clustering of time series.
Time-ordered data ask for clusters with a structure that plain fuzzy clustering does not know: segments must be contiguous in time, regressors of a dynamic model must be chosen before the model is fitted, and the state of a chaotic system has to be reconstructed from a scalar measurement. This sub-package collects the clustering-based answers of the Abonyi group:
FuzzySegmentation– fuzzy segmentation of multivariate series by modified Gath–Geva clustering with local PCA models and compatible-cluster merging;bottom_up_segmentation()is the classical PCA-based bottom-up baseline (pca_segment_cost()its cost);fnn_model_order()/select_model_order()– model-order selection by false nearest neighbors with a cluster-based adaptive threshold (cluster_based_threshold());false_nearest_neighbors()is the classical FNN of Kennel et al.;ChaoticPredictor– state-space reconstruction of a chaotic series by delay embedding (delay_embedding(),select_delay()) and clustering-based local linear models, withembedding_scan()/select_embedding_dimension()for the embedding and local dimension andcorrelation_dimension()as the fractal counterpart;MixedInputStructureSelection/select_structure_mixed()– model-free regressor selection for models with discrete and continuous inputs by fuzzy variance decomposition (fuzzy_variance());data generators
make_*and the plot helpersplot_*.
Fuzzy segmentation, model order selection, state-space reconstruction and prediction, structure selection with mixed inputs.
Classes#
|
Fuzzy segmentation of a multivariate time series (modified Gath–Geva clustering). |
|
Operating-regime model of a chaotic series in the reconstructed state space. |
|
Estimator form of |
Functions#
|
Bottom-up segmentation with PCA models (Keogh et al. style, multivariate extension). |
|
Cost of approximating a segment by one PCA model with |
|
Classical false-nearest-neighbor percentages over the model orders \((n_a, n_b)\). |
|
Model order of a NARX model by false nearest neighbors with a cluster-based threshold. |
|
Convenience wrapper of |
|
Point-wise FNN thresholds \(R_k\) from Gath–Geva clusters in the regression space. |
|
Delay vectors \(\mathbf{y}_k=[y_k, y_{k-\tau},\dots,y_{k-\tau(d_e-1)}]^T\) of a scalar series. |
|
Lag \(\tau\) of the delay embedding from the series itself. |
|
Fit |
|
Read the embedding and the local dimension off an |
|
Grassberger–Procaccia correlation dimension of a point cloud (e.g. delay vectors). |
|
Rank all candidate input structures by their fuzzy variance (Girimonte, Babuška & Abonyi). |
|
Total fuzzy variance \(\sigma_t\) of |
|
Time plots of the variables with the fuzzy segments underneath. |
|
Heat map of the percentage of false nearest neighbors over the orders \((n_a, n_b)\). |
|
One-step prediction error and local-dimension index versus the embedding dimension. |
|
Two coordinates of a reconstructed (or true) state space, colored by cluster. |
|
Variance--complexity trade-off \(VCT=\sigma_t n_i\) along the ranking of structures. |
|
Multivariate series with planted regime changes (segmentation benchmark). |
|
Mackey–Glass delay-differential series (chaotic for \(\tau=17\)). |
|
Trajectory of the Lorenz system (RK4, fixed step). |
|
Trajectory of the Rössler system with the parameters of Abonyi et al. (2004). |
|
Continuous polymerization reactor benchmark of the FNN model-order paper. |
|
Regression problem with one discrete and several continuous inputs. |