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.; withuse_sizea 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 fromsize_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.