mvtsa.warping.MixedSegmentDistance#

class mvtsa.warping.MixedSegmentDistance(weights=None, level_scale=1.0)[source]#

Bases: object

Weighted 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\).

weights is a dict of non-negative weights; components with zero weight are skipped. The weights can be learned by learn_segment_weights().

Examples

>>> d = MixedSegmentDistance({"level": 1.0, "trend": 1.0})
>>> callable(d)
True

Examples using mvtsa.warping.MixedSegmentDistance#

A multivariate mixed segment distance

A multivariate mixed segment distance