mvtsa.warping.CBDTW#
- class mvtsa.warping.CBDTW(n_segments=10, n_components=2, statistic='Q', lags=0, local='krzanowski', window=None, step='symmetric1', warping=True, standardize=True, initial_size=None)[source]#
Bases:
_SegmentedCollectionCorrelation-based dynamic time warping (Bankó and Abonyi, 2012).
Steps (Bankó, 2015, Section 3.1): (1) every series of the database is segmented by the homogeneity of its correlation structure – bottom-up with the PCA \(Q\) (or \(T^2\)) cost; (2) a query is segmented in the same way; (3) DTW aligns the segment sequences with the local dissimilarity \(1-s_{PCA}\).
- Parameters:
- n_segments
intorfloat Segments per series; a float in (0, 1) is a fraction of the length.
- n_components
int Principal components of the segment models (and of the segmentation cost).
- statistic{“Q”, “T2”}
Segmentation cost.
- lags
int Dynamic PCA lags:
lags > 0gives the process-dynamics-aware measure of thesis II.- local
strorcallable() Local dissimilarity of the segment models:
"krzanowski"(CBDTW),"lambda","eros","grassmann","chordal"or the Riemannian"log_euclidean","affine_invariant","bures_wasserstein","gaussian_w2","jeffreys", or aMixedSegmentDistance.- window
DTWwindowoversegmentindices(seewindow_mask()). - step
str Step pattern (Bankó used type I =
"symmetric1").- warpingbool
Falsegives SEGPCA (rigid segment-wise comparison).- standardizebool
Standardize all series with the statistics of the fitted collection.
- initial_size
int,optional Initial segment length of the bottom-up segmentation.
- n_segments
Examples
>>> from mvtsa.datasets import make_signatures >>> data, writer = make_signatures(n_writers=3, n_per_writer=4, random_state=0) >>> D = CBDTW(n_segments=8, n_components=2).fit(data).pairwise() >>> D.shape (12, 12)
Examples using mvtsa.warping.CBDTW#
When the information is in the correlation structure
Real data: Japanese vowels and Riemannian local distances