-
Notifications
You must be signed in to change notification settings - Fork 208
[ENH]: Add kdtw distance implementation #2827
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
base: main
Are you sure you want to change the base?
Conversation
…and tests are broken)
Thank you for contributing to
|
aeon/distances/kernel/_kdtw.py
Outdated
return ( | ||
1.0 | ||
- _kdtw_cost_matrix(x, y, gamma, epsilon, normalize_input)[n, m] / norm_factor | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This similarity-to-distance conversion part is problematic (if no input normalization is used) because the computed similarities are very, very small for most inputs and, thus, vanish.
E.g., all the following similarities will disappear in floating-point arithmetic (first two basic motions time series with different gammas):
1.0 - 2.7435e-123 == 1.0
1.0 - 4.9180e-72 == 1.0
1.0 - 6.5392e-53 == 1.0
Reference Issues/PRs
What does this implement/fix? Explain your changes.
Adds KDTW distance (univariate, multivariate, and variable-length support).⚠️ ).
Original implementation is at https://people.irisa.fr/Pierre-Francois.Marteau/REDK/KDTW/kdtw.m (Matlab
Open todos:
kdtw
kernel in KernelKMeans implementationDoes your contribution introduce a new dependency? If yes, which one?
no