dtw
function using L2 norm for both the local cost matrix
(LCM) creation as well as the final cost aggregation step.
dtw2(x, y, ...)
dtw
.dtw
.
The dtw
function allows changing the norm by means of its dist.method
parameter, but it only uses it when creating the LCM, and not when calculating the final
aggregated cost, i.e. the DTW distance.
This wrapper simply returns the appropriate DTW distance using L2 norm (Euclidean norm).
The windowing constraint uses a centered window. The calculations expect a value in
window.size
that represents the distance between the point considered and one of the edges
of the window. Therefore, if, for example, window.size = 10
, the warping for an
observation $x_i$ considers the points between $x_{i-10}$ and $x_{i+10}$, resulting
in 10(2) + 1 = 21
observations falling within the window.