tslearn
tslearn copied to clipboard
Added method to compute dtw distance using custom metric without the path
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 Report
Patch coverage: 100.00
% and project coverage change: +0.02
:tada:
Comparison is base (
d8c1930
) 94.57% compared to head (08e068e
) 94.60%.
:exclamation: Current head 08e068e differs from pull request most recent head 71a92e6. Consider uploading reports for the commit 71a92e6 to get more accurate results
:exclamation: 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%) |
:arrow_up: |
tslearn/tests/test_metrics.py | 100.00% <100.00%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
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:
- This looks great (almost ready for integration)
- I would rather call the function
dtw_from_metric
Hello @rtavenar
I have made the change. Hope it all looks ok. Happy to make other changes if needed.