mvtsa.warping.MixedSegmentDistance#
- class mvtsa.warping.MixedSegmentDistance(weights=None, level_scale=1.0)[source]#
Bases:
objectWeighted multivariate segment dissimilarity (a generalization of MDPLA).
For two segment models the components are
"level": mean absolute difference of the means (in units of the collection standard deviation);"trend": mean absolute difference of the slope angles, scaled to [0, 1];"structure": \(1-s_{PCA}\) of the principal subspaces;"scale": \(\lvert\log(\operatorname{tr}\Sigma_a/\operatorname{tr}\Sigma_b)\rvert\);"duration": \(\lvert\log(L_a/L_b)\rvert\).
weightsis a dict of non-negative weights; components with zero weight are skipped. The weights can be learned bylearn_segment_weights().Examples
>>> d = MixedSegmentDistance({"level": 1.0, "trend": 1.0}) >>> callable(d) True