Very slow execution for middle to large datasets
omarcr opened this issue · comments
Hi, is there any change in the code that you might recommend to speed up the execution of the algorithm?
DTW in general is O(n^2), so that's expected. You could look into this https://en.wikipedia.org/wiki/Dynamic_time_warping#Fast_computation
Sorry for delay - missed this. As @Nixonite mentioned, DTW is O(N^2) and it is used within a non-optimized naive KNN algorithm which is O(dN). Combining these, you get a model that doesn't scale well.