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

[ENH] Parameterise the dtw and adtw distances #1874

Open
itsdivya1309 opened this issue Jul 31, 2024 · 0 comments
Open

[ENH] Parameterise the dtw and adtw distances #1874

itsdivya1309 opened this issue Jul 31, 2024 · 0 comments
Labels
distances Distances package enhancement New feature, improvement request or other non-bug code enhancement

Comments

@itsdivya1309
Copy link
Contributor

Describe the feature or idea you want to propose

Recent advances in similarity-based classification, like the Proximity Forest 2.0 include parameterising cost functions used in similarity measures. However, the current aeon implementation of dtw uses squared distance as the cost function. The Minkowski distance is a generalised form of both the Euclidean and Manhattan distance, and hence can be used as the cost function for dtw and adtw.

Describe your proposed solution

Use Minkowski distance instead of squared_univariate_distance to compute the dtw cost matrix.
distance = np.sum((np.abs(x - y) ** p)) ** (1.0 / p)

Describe alternatives you've considered, if relevant

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distances Distances package enhancement New feature, improvement request or other non-bug code enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants