Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output of the distance matrix #14

Open
arturoribes opened this issue Oct 6, 2017 · 4 comments
Open

Output of the distance matrix #14

arturoribes opened this issue Oct 6, 2017 · 4 comments

Comments

@arturoribes
Copy link

Is it possible to output the distance matrix? Right now it is just the distance and the path (which can also be obtained from the distance matrix).

@glfeng318
Copy link

try:

import scipy.spatial.distance as ssd
dist = ssd.pdist(df, lambda x1, x2: fastdtw.fastdtw(x1, x2,dist=euclidean))
ssd.squareform(dist)

@rachitagrwl
Copy link

Can we implement Manhattan distance and call it without using scipy library.?

@arturoribes
Copy link
Author

@feng5 I don't quite understand your example. What is df? From the docs, it should be an array of m observations in n-dimensional space.
In my case, I want the distance matrix that fastdtw uses to obtain the alignment between 2 sequences of different lengths in a d-dimensional space.

@arturoribes
Copy link
Author

@rachitagrwl of course, you can provide your distance as a two-parameter function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants