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

Added method to compute dtw distance using custom metric without the path #452

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sw241395
Copy link

Added in a method too compute the DTW distance between 2 time series using a custom metric but not generate the path.

Overall computing DTW can be quite a slow process, so i though if you was only interested in the distance then you could help speed up the code buy not creating the path. I have tried to keep it consistent with the rest of the code but happy to made stylistic changes if needed.

Overall still new to contributing to open source so happy to make any changes and feedback is always appreciated.

@codecov-commenter
Copy link

codecov-commenter commented May 27, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (d8c1930) 94.57% compared to head (08e068e) 94.60%.

❗ Current head 08e068e differs from pull request most recent head 71a92e6. Consider uploading reports for the commit 71a92e6 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #452      +/-   ##
==========================================
+ Coverage   94.57%   94.60%   +0.02%     
==========================================
  Files          62       62              
  Lines        4738     4762      +24     
==========================================
+ Hits         4481     4505      +24     
  Misses        257      257              
Impacted Files Coverage Δ
tslearn/metrics/__init__.py 100.00% <ø> (ø)
tslearn/metrics/dtw_variants.py 97.19% <100.00%> (+0.08%) ⬆️
tslearn/tests/test_metrics.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rtavenar
Copy link
Member

Hi @sw241395

Thanks for this suggestion. You are perfectly right that this should be offered as a direct function to the end-user.

Here is my quick feedback:

  1. This looks great (almost ready for integration)
  2. I would rather call the function dtw_from_metric

@sw241395
Copy link
Author

Hello @rtavenar

I have made the change. Hope it all looks ok. Happy to make other changes if needed.

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

Successfully merging this pull request may close these issues.

3 participants