qualitative approximation to dynamic time warping similarity between time series data
DESCRIPTION
Qualitative approximation to Dynamic Time Warping similarity between time series data. Blaž Strle, Martin Možina, Ivan Bratko Faculty of Computer and Information Science University of Ljubljana Slovenia. Dynamic Time Warping (1/4). - PowerPoint PPT PresentationTRANSCRIPT
Qualitative approximation to Dynamic Time Warping similarity between time
series data
Blaž Strle, Martin Možina, Ivan BratkoFaculty of Computer and Information Science
University of LjubljanaSlovenia
Dynamic Time Warping (1/4)
• Dynamic time warping (DTW) is a method for measuring similarity between two time series
• Time series is a sequence of observations, measured at successive times, spaced at (often uniform) time intervals
• Time series ex.: TS = (9.47, 9.50, 9.48, 9.41, 9.32, 9.26, 9.21, 9.11, 9.01, 8.83, … )
Dynamic Time Warping (2/4)
Euclidean distance• does not align values• both time series need to be
of the same size
DTW• aligns two time series in the
way some distance measure is minimized
• time series sizes may vary
Dynamic Time Warping (3/4)• DTW can be efficiently calculated using dynamic
programming:D(i, j) = min(
D(i-1, j),D(i, j-1),D(i-1, j-1) ) + d(ai, bj)
D(i, j) = DTW( A(1..i), B(1..j))
d(ai, bj) is a distance betweentwo values of time series
Dynamic Time Warping (4/4)
Large amout of data Portable devices
Drawback – time complexity O(N2)
Improvements of Dynamic Time Warping
• Constraints– limit a minimum distance warp path search space by reducing allowed
warp along time axis
• Data abstraction– reduce the size of the input time series
QDTW (1/3)• Idea: reduce time series size by removing information that is
irrelevant for DTW
• Theorem: If two sequences A and B, |A| = n, |B| = m are qualitatively equal then:
DTW(A,B) ≤ ε, where ε = min(n × maxdiff(A)/2, m × maxdif(B)/2).
• two sequences are qualitatively equal if both sequences are monotonic and their start and end values are equal
• Term maxdiff (S) is the maximal absolute difference between two adjacent elements in a time series S.
QDTW (2/3)
1. Transform time series into qualitative representation (QING)
2. Use DTW on extreme points
QING
QDTW (3/3)
• If two sequences A = (a1, a2, … an), B = (b1, b2, …, bm), are qualitatively equal than :– QDTW(A,B) = DTW( (a1, an), (b1, bm) ) = 0
– |DTW(A,B) - QDTW(A,B)| ≤ ε – from Theorem
Violatins of conditions for the applicability of TheoremExtreme points do not coincide Sequences are not monotonic
DTW(A,D) > DTW(A,C) > DTW(A,B)QDTW(A,D) = QDTW(A,C) > QDTW(A,B)
1. Non monotonic part of B is not detected:QDTW(A, B) = 0, DTW(A, B) > 0
2. Monotonic part is detected:QDTW(A, B) is larger than it should be
Experimental Evaluation (1/3)
• Datasets:– Australian Sign Language signs (UCI)– Character Trajectories (UCI)– Character Recognition
• Accuracy– Classification using k-nn (k=3)– Leave one out
Experimental Evaluation (2/3)
• Efficiency– Estimated by size of the martix D– Size D = |A| x |B|, where
A and B are time series we are comparing
Experimental Evaluation (3/3)
Conclusion• DTW is a method for measuring similarity between two time
series• DTW’s time complexity O(N2) makes it useful only for
relatively short time series• QDTW is qualitative approximation to DTW• QDTW can be up to 1000 faster than DTW• Improvements in efficiency are often obtained at acceptable
loss in classification accuracy
• Future work: improve QDTW accuracy by reducing errors due to violations of the conditions for the applicability of the theorem