DTW
通过矩阵运算实现快速dtw实现两个序列的动态时间规整,通过矩阵运算而不是顺序向量运算来加速比:dtw,fastdtw包更快(循环迭代而无需矩阵运算)
Parameters
----------
x: numpy.ndarray
x.ndim == 1 or 2
y: numpy.ndarray
y.ndim == 1 or 2 (consistent with x)
dist: function
function which measures distance between frames from x and y
if (ndim == 1)
function should compare entry to entry(x[i], y[j]), and return single entry
if (ndim == 2)
2022-01-05 18:13:53
2KB
Python
1