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: _SegmentedCollection

Correlation-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_segmentsint or float

Segments per series; a float in (0, 1) is a fraction of the length.

n_componentsint

Principal components of the segment models (and of the segmentation cost).

statistic{“Q”, “T2”}

Segmentation cost.

lagsint

Dynamic PCA lags: lags > 0 gives the process-dynamics-aware measure of thesis II.

localstr or callable()

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 a MixedSegmentDistance.

windowDTW window over segment indices (see window_mask()).
stepstr

Step pattern (Bankó used type I = "symmetric1").

warpingbool

False gives SEGPCA (rigid segment-wise comparison).

standardizebool

Standardize all series with the statistics of the fitted collection.

initial_sizeint, optional

Initial segment length of the bottom-up segmentation.

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#

Correlation-based dynamic time warping

Correlation-based dynamic time warping

When the information is in the correlation structure

When the information is in the correlation structure

Process-dynamics-aware warping: DPCA-CBDTW

Process-dynamics-aware warping: DPCA-CBDTW

Real data: Japanese vowels and Riemannian local distances

Real data: Japanese vowels and Riemannian local distances

A multivariate mixed segment distance

A multivariate mixed segment distance

Clustering multivariate recordings: BasicMotions

Clustering multivariate recordings: BasicMotions