mvtsa.warping.align_episodes#

mvtsa.warping.align_episodes(e1, e2, gap=0.1, method='global', use_size=True, substitution=None, size_thresholds=None)[source]#

Alignment of two episode sequences (Balaskó, Bankó and Abonyi, 2007).

Returns (normalized_score, pairs) and the aligned episode pairs. The score is scaled so that a perfect alignment gives 10: without size weighting it is divided by the length of the shorter sequence, as in Balaskó et al.; with use_size a substitution score is multiplied by 1/3 or 2/3 when the smaller of the two episodes is “small” or “medium” (size classes from the terciles of the pooled durations and magnitudes, or from size_thresholds = (duration_thresholds, magnitude_thresholds)), and the score is divided by the smaller of the two size-weighted sequence lengths \(\sum_i f_i\), so that identical sequences still score 10 while small episodes count less.

Examples using mvtsa.warping.align_episodes#

Comparing qualitative trends: episode alignment

Comparing qualitative trends: episode alignment