# Practical handling of Dynamic Time Warping for time-series with unequal sampling frequency (irregular time series)

Hi all and thank you for taking time to read this.

When I read the general literature about dynamical time warping (and the vignette for the $$\texttt{R}$$ package $$\texttt{dtw}$$), the time series seem to be given at the same time index. They are not of the same length, and I do know you can do a warping that does not require the beginning and ending of the series to match, but it seems to me, that the time distance between measurements is always the same. I might be reading it all wrong, but as I see it I need two time series complying to the following in order to compare them: $$X = (X_t)_{t \in \{1,\dots n\}}$$ and $$Y = (Y_t)_{t \in \{1,\dots m\}}$$ where the time between observations $$X_t$$ and $$X_{t+1}$$ is the same as between $$Y_h$$ and $$Y_{h+1}$$ $$\forall (t,h) \in \{1,\dots n\}\times\{1,\dots m\}$$ (namely index 1).

However I have two time series looking like this: $$X = (X_{t_i})_{t_i \in \{t_1,\dots t_n\}}$$ and $$Y = (Y_{h_j})_{h_j\in \{h_1,\dots h_m\}}$$ where $$d(t_i,t_{i+1})\neq d(h_j,h_{j+i})$$ (just plain euclidean distance $$d$$). You could think of them both as independently randomly sampled in time. Now it seems to me that what I should do is to do some kind of interpolation of each time series separately, extract series $$X'_t$$ and $$Y'_t$$ and warp these? I can of cause (if I do not care about calculation time) make the smallest set of equidistantly sampled time points which include all my actually sampled time points - but that could be somewhat cumbersome. I guess my question is - what do you usually do? Just low key practical handling of the issue?