cdtw.dtw.dtw_path

cdtw.dtw.dtw_path(cost_mat)[source]

Finds the best path (an array of x- and y-coordinates) to align x to y, given the cost matrix cost_mat = dtw_mat(x, y).

Parameters:
cost_mat(N, M) np.ndarray

The output of the dtw_mat() function.

Returns:
path(L, 2) np.ndarray

The path that aligns x to y in time.