MODULE REFERENCE
dtw
anomx.data.processing.dtwDynamic Time Warping (DTW)
Tools for computing Dynamic Time Warping alignment between time series, including cost matrices, alignment algorithms, and windowing constraints (Sakoe-Chiba, Itakura).
Public exports
Import these names directly from anomx.data.processing.dtw.
CRWindowCompressed row representation window. Stores the range of active grid cells in each column. Any window with contiguous columns can be expressed as a CRWindow. Supports efficient iterative construction and updates.
CostMatrix(n+1) x (m+1) Matrix Cell (i,j) corresponds to minimum total cost/distance of matching elements (i-1, j-1) in series1 and series2.
DTWAlignmentDynamic Time Warping (DTW) Alignment.
ItakuraForms the Itakura parallelogram, where max_slope determines the slope of the steeper side.
NoWindowWindow covers the entire grid, meaning every possible alignment between series1 and series2 is considered.
SakoeChibaForms a diagonal window where window_size controls the maximum allowed shift between the two series. If both time-series have the same time axis, window_size corresponds to the maximum number of time periods
dtwDetermines the optimal alignment between two time series `series1` and `series2`, according to the Dynamic Time Warping algorithm. The alignment minimizes the distance between pair-wise elements after warping. All elements in the two series are matched and are in strictly monotonically increasing order. Considers only the values in the series, ignoring the time axis.