Originally Posted by JavertKurtz
Having the same problem - did you ever figure it out?
I never got MLPY installed, but I did find a good workaround. I used the RPY2 library to access R from Python. R has a Dynamic Time Warping module. It meant I had to install R, install the dtw module, install RPY2, plus figure out how to use it all, but it did work.
R: (http : // www . r-project . org)
RPY2: (http : // rpy . sourceforge .net / rpy2 . html)
dtw package for R: (http : // dtw . r-forge . r-project . org)
(the links have spaces in because new users aren't allowed to post links, even if they are helpful, stupid rule)
Here's some Python code that should work once you have RPY2, R, and the dtw module installed (install dtw from within R once you have R).
from rpy2.robjects.packages import importr
from rpy2 import robjects
from rpy2 import rinterface
R = rpy2.robjects.r
DTW = importr('dtw')
# Calculate the alignment and DTW distance
alignment = R.dtw(query, reference, keep=True)
distance = alignment.rx('distance')
# Plot the warped curve
# Some plotting stuff inside R:
# Show the alignment
# Show the warping function
# You can call this to refresh the R windows if you resize them
I hope that helps!
(By the way I had to register a new account because this forum's password reset doesn't work)