Dynamic time warping (DTW) is used to the measure the similarity of two time series. The generic DTW algorithm is O(n2) in both space and time. Thus, it is not well suited for large data. There are a lot of variant algorithms that attempt to address such limitation. One of the most well-known algorithms is FastDTW by Stan Salvador and Philip Chan, which is O(n) in both space and time. This algorithm can find the optimal, or a close to optimal warp path between two series, depending on the search radius used.. TD_DTW implements the algorithm from scratch using C++. The behavior mostly matches the FastDTW Java implementation done by the original authors. It should be noted that the Python fastdtw package has several algorithm differences with the Java version. So, the result of TD_DTW may not match that of Python fastdtw, but it should closely match the Java implementation.. TD_DTW does have a slightly different behaviors from the Java implementation. In Java implementation, the shrunk (i.e. reduced) series is half of the parent series. If the parent series has odd number of elements, while most of the elements of the shrunk series are the average of two parent elements, the last element of the shrunk series is the average of the last three elements of the parent series. TD_DTW instead chooses to have the last element to match the last element of the parent. As the result, TD_DTW can have slightly larger size in the shrunk series in each recursion. While there can be edge cases, this slight deviation mostly has little effect in finding the best warp path within the radius.
- Type: DB SessionTeradata ConnectionConnection to a Teradata Database Instance
- Type: TableInputThe two series inputs must have the same number of payload columns.
- Type: TableInput2The two series inputs must have the same number of payload columns.