Appendix C
Method index and migration
This appendix lists the methods of the book with their classes or functions in mvtsa and their origins, and explains how to move from the group’s earlier MATLAB implementations to the package. Group marks methods developed at the University of Pannonia, new methods introduced in this book; the others implement methods of the literature.
|
Method |
API |
Origin |
|
||
Segmentation
| ||
|
PCA segmentation, and costs (group) |
PCASegmenter, CostPCA | |
|
Modified Gath–Geva fuzzy segmentation (group) |
GGSegmenter |
[2] |
|
Kalman filtering and segmentation (group) |
kalman_smoother + any segmenter |
[3] |
|
Dynamic-PCA segmentation (group) |
DPCASegmenter, select_dpca_lag | |
|
Recursive-PCA on-line segmentation (group) |
RecursivePCASegmenter, RecursivePCA | |
|
Fisher-information segmentation (group) |
FisherSegmenter | |
|
Model-based energy segmentation (group) |
CostRegression |
[16] |
|
Krzanowski neighbour merging |
KrzanowskiSegmenter | |
|
Costs L2, L1, Gaussian, linear, AR, kernel |
get_cost, COSTS | |
|
Bottom-up, top-down, sliding window, SWAB |
BottomUp, TopDown, SlidingWindow, SWAB | |
|
Optimal partitioning, PELT, penalty path |
OptimalPartition, PELT, penalty_path | |
|
Merge tree, segmentogram, persistence (new) |
MergeTree, plot_segmentogram |
this book |
|
Relative reduction rate, permutation test |
select_n_segments | |
|
Bayesian on-line change point detection |
BOCPD |
[25] |
|
Sticky Gaussian HMM |
GaussianHMMSegmenter | |
|
Sparse Gaussian states |
SparseGaussianStateSegmenter |
[95] |
|
Segment-then-cluster states (new) |
StateSegmenter |
after [93] |
|
ClaSP, FLUSS (centred) |
ClaSPSegmenter, FLUSSSegmenter | |
|
Predictive homogeneity (new) |
PredictiveSegmenter |
after [96] |
|
Consensus segmentation (new) |
ConsensusSegmenter |
this book |
|
CUSUM, buffered streaming |
CUSUMDetector, StreamSegmenter |
[97] |
Warping and similarity
| ||
|
Correlation-based DTW, SEGPCA (group) |
CBDTW, segpca_distance | |
|
Dynamic-PCA CBDTW (group) |
CBDTW(lags=...) |
[8] |
|
MPLA, SPLA, MDPLA, tightness of warping (group) |
PLADistance, tightness_of_warping |
[7] |
|
Episode alignment (group) |
triangular_episodes, align_episodes | |
|
Riemannian and mixed segment distances, episode DTW (new) |
LOCAL_DISTANCES, MixedSegmentDistance, episode_dtw | |
|
DTW, windows, step patterns, lower bounds |
dtw, window_mask, lb_keogh, lb_kim | |
|
DDTW, WDTW, ADTW, shapeDTW, FastDTW |
ddtw, wdtw, adtw, shape_dtw, fast_dtw | |
|
Dependent and independent multivariate DTW |
dtw, dtw_independent | |
|
LCSS, EDR, ERP, TWED, MSM |
lcss, edr, erp, twed, msm | |
|
Soft-DTW, divergence, GAK, SBD |
soft_dtw, soft_dtw_divergence, gak, sbd | |
|
DBA, soft-DTW barycenter, elastic ensemble |
dba, soft_dtw_barycenter, ElasticEnsemble | |
Clustering, representation, visualization
| ||
|
Fuzzy Sammon mapping (group) |
fuzzy_sammon |
[18] |
|
Neighbourhood-preservation trajectory clustering (group) |
TrajectoryClustering |
[19] |
|
Six-sigma visibility graphs (group) |
six_sigma_visibility_graph |
[20] |
|
Decision-tree description of regimes (group) |
explain_states |
[17] |
|
k-Shape, DBA -means, -medoids, fuzzy -medoids |
KShape, TimeSeriesKMeans, KMedoids, FuzzyCMedoids | |
|
Spectral, density-based, consensus clustering |
SpectralClustering, DensityClustering, ConsensusClustering | |
|
PAA, APCA, PLA, PIP, SAX, ABBA, SFA |
paa, apca, pla, pip, sax, abba, sfa | |
|
Features, path signatures |
extract_features, signature_features | |
|
Visibility, recurrence, ordinal networks; images |
visibility_graph, recurrence_network, ordinal_partition_network, gramian_angular_field | |
|
Matrix profile, -NN profile |
matrix_profile, knn_profile | |
|
||
|
||
|
||
|
||
|
||
Migration from the MATLAB toolboxes
Two MATLAB implementations of the group’s methods are available on the MathWorks File Exchange: Correlation based dynamic time warping of multivariate time series (CBDTW) and Fuzzy clustering based time-series segmentation (the modified Gath–Geva algorithm). Table C.2 maps their main steps to the package. Three differences matter in practice. First, mvtsa standardizes explicitly and records the statistics in the fitted object, so that queries are segmented “according to the database”. Second, change points are the first samples of new segments (0-based), and the boundaries and are not listed. Third, the number of principal components can be a fraction of explained variance, resolved once on the whole series and then kept fixed for every segment, which keeps segment models comparable.
MATLAB step | mvtsa |
bottom-up PCA segmentation of a series ( or cost) | PCASegmenter(n_segments, n_components, statistic="Q") or BottomUp("pca", ...) |
segment PCA models and the cost matrix | segment_models, segment_local_cost |
DTW of the segment sequences (CBDTW) | CBDTW(...) .fit(collection) .pairwise() |
SEGPCA baseline | CBDTW(..., warping=False), segpca_distance |
precision–recall evaluation of retrieval | precision_recall_curve_knn, plot_precision_recall |
modified Gath–Geva fuzzy segmentation with compatible merging | GGSegmenter(n_segments, n_components, merge=True) |
fuzzy memberships and segment models | memberships_, models_, centers_t_, sigmas_t_ |
|