fpetitjean / DBA

DBA: Averaging for Dynamic Time Warping
http://www.francois-petitjean.com/Research/
GNU General Public License v3.0
183 stars 46 forks source link

squared_DTW out of bounds error #5

Closed cmuell89 closed 5 years ago

cmuell89 commented 5 years ago

When the number of channels is greater than the max length of a series, the squared_DTW failes in the following loop: for i in range(1, s_len): cost_mat[i, 0] = cost_mat[i-1, 0]+delta_mat[i, 0]

Why should the cost matrix and delta_mat depend on the number of features in my feature vector?

fpetitjean commented 5 years ago

Hi, Stupid bug - fixed now (the question is how did this ever worked?!). Python is pretty slow though, if you have issues with performance, I could make a Cython one. Cheers, François