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

Documentation error in dtw_ndim.distance #221

Open
dieJaegerIn opened this issue Oct 11, 2024 · 0 comments
Open

Documentation error in dtw_ndim.distance #221

dieJaegerIn opened this issue Oct 11, 2024 · 0 comments

Comments

@dieJaegerIn
Copy link

Hi,

I believe there is an error in the documentation for the function dtaidistance.dtw_ndim.distance.

The current documentation states:

Assumes the first dimension to be the sequence item index, and the second dimension to be the series index (thus timestep).

However, in the example for independent DTW the loop calculates dtw between the dimensions individually: s1[:, dim] and s2[:, dim], where the first dimension represents the timesteps. Because of this, I'm a bit confused about the shape of the input arrays.

Additionally, the example code for independent DTW does not work as written:

dtw_i = 0
for dim in range(ndim):
    dtw_i += dtw.distance(s1[:, dim], dtw.distance(s2[:, dim]))

I believe it should be:

dtw_i += dtw.distance(s1[:, dim], s2[:, dim])

Thank you for looking into this!

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

1 participant