Use the aa.dtw() function to perform dynamic time warping (DTW), which measures the similarity (warping distance) between two time series that vary in time or speed. Users can use DTW to analyze any data that can be represented linearly, for example, video, audio, and graphics.