DTW + python 矩阵操作 + debug
Posted 渡轮终会回航
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DTW + python 矩阵操作 + debug相关的知识,希望对你有一定的参考价值。
1. from here.
diagonal
Return specified diagonals.
diagflat
Create a 2-D array with the flattened input as a diagonal.
trace
Sum along diagonals.
triu
Upper triangle of an array.
tril
Lower triangle of an array.
2. DTW distance. dtaidistance
from dtaidistance import dtw ds = dtw.distance_matrix_fast(x)
3. sparce matrix in csr format.
4. Bug: AttributeError: module \'community\' has no attribute \'best_partition\'
import community
但是安装包是不是安装community,而是安装pip intall python-louvain.
以上是关于DTW + python 矩阵操作 + debug的主要内容,如果未能解决你的问题,请参考以下文章
DTW 笔记: Dynamic Time Warping 动态时间规整 (&DTW的python实现)