I am looking for a similarity measure between series which exploits the time dimension (rather than just its "mapping" aspect), and was unsatisfied with everything I found.

First an example: assume I have daily data about expenditure of each of two indviduals, and I want to see if there is some imitation process by which when one spends more, the other does too - and possibly vice-versa - but maybe not on the same exact day.

So here are my requirements:

  1. the same event (e.g. a spike in spending) happening to both series on different days is "less similar" than if it happens on the same day
  2. ... but it is more similar if the two days are close than if they are distant
  3. all days have the same importance (with the possible exception of boundary effects)
  4. the measure is possibly linear, in the sense that distance doesn't change if I increase the same term of the two series by a same amount
  5. bonus points if the measure is elegant, intuitive, parameter free, and applicable to small series

Examples I have looked at:

  • correlation, Spearman correlation, cosine similarity, Kendall rank correlation... don't satisfy 2.
  • Dynamic Time Warping doesn't satisfy 1.
  • absolute distance doesn't satisfy 2., and Euclidean distance doesn't even satisfy 4.
  • I briefly fell in love with the Euclidean distance between cumulative sums... but it doesn't satisfy 3. (if I add 1 to the first term of a constant series it increases/decreases distance from another given series much more than if I add 1 to the last term)
  • fitting functions and comparing parameters has problems (to the best of my knowledge) with 4. and 5.

I am currently considering a version of dtw which penalizes "misalignment", or (which might end up being the same thing) a version of the Euclidean distance between cumulative sums where the impact of each difference is somehow weighted depending on its position. But something inside me is telling "there must be a standard solution out there". Moreover, there is always a tradeoff between penalizing difference in levels and in timing, and I wonder whether there is a particularly meaningful choice to make.

  • 2
    $\begingroup$ I can't claim to fully understand your requirements but it may be that all of them will never be fully satisfied by a single method. Despite their wide use Euclidean distances have many drawbacks not least of which is the assumption of symmetry between points. Information-theoretic distance metrics for time series comparisons are proliferating. DTW is one such approach. Others include Andreas Brandmaier's permutation distance clustering (PDC, e.g., jstatsoft.org/article/view/v067i05/v067i05.pdf) which leverages Kullback-Lieber divergence. Eamonn Keogh's SAX software is another. $\endgroup$ – DJohnson May 26 '18 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.