Skip to main content

具有 O(N) 时间和内存复杂度的动态时间规整 (DTW) 算法。

项目描述

快速dtw

FastDTW [ 1 ]的 Python 实现,它是一种近似动态时间规整 (DTW) 算法,可提供 O(N) 时间和内存复杂度的最优或接近最优对齐。

安装

pip install fastdtw

例子

import numpy as np
from scipy.spatial.distance import euclidean

from fastdtw import fastdtw

x = np.array([[1,1], [2,2], [3,3], [4,4], [5,5]])
y = np.array([[2,2], [3,3], [4,4]])
distance, path = fastdtw(x, y, dist=euclidean)
print(distance)

参考

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

fastdtw-0.3.4.tar.gz (133.4 kB 查看哈希

已上传 source

内置分布

fastdtw-0.3.4-cp37-cp37m-macosx_10_14_x86_64.whl (103.9 kB 查看哈希

已上传 cp37