TD_​DTW

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.

Options

DISTANCE
The distance function to be used. The currently supported names are: 'euclidean' - for Euclidean distance function; 'manhattan' - for Manhattan distance function; 'binary' - For binary distance function. The match is case in-sensitive.
InputFormat
Specifies the input mode supported by the function.
RADIUS
The search radius for the FastDTW algorithm. It cannot be negative. The range of the values is between 0 and 1000.Because of how FastDTW works, bigger radiuses can cause significant performance issues without providing a better result. Oftentimes, small radius is good enough for finding the optimal match.
Output Schema
Output Schema, if Volatile is true then use user login as the schema.
Output Table
Output Table
VAL Location
VAL Location
Volatile
Specifies whether the table should be a VOLATILE table. If true, then the table is automatically deleted, otherwise it is users responsibility to remove or clean it up for space.
WARPPATH
The valid values are between 0 and 3.'0' indicates that no warp paths should be generated. Only the warp distance is calculated.'1' indicates that warp paths should be generated with 'WarpX' and 'WarpY' output columns being the path index.'2' indicates that warp paths should be generated with 'WarpX_I' and 'WarpY_I' being the series 1 and series 2 ROW_I values at the path index.'3' indicates that warp paths should be generated with both the output columns of 1 and 2.

Input Ports

Icon
Connection to a Teradata Database Instance
Icon
The two series inputs must have the same number of payload columns.
Icon
The two series inputs must have the same number of payload columns.

Output Ports

Icon
output of TD_DTW

Nodes

Extensions

Links