-
Notifications
You must be signed in to change notification settings - Fork 264
Open
0 / 80 of 8 issues completedOpen
0 / 80 of 8 issues completed
Copy link
Labels
distancesDistances packageDistances packageenhancementNew feature, improvement request or other non-bug code enhancementNew feature, improvement request or other non-bug code enhancement
Description
Describe the feature or idea you want to propose
@raphaelgimenezneto reduced the memory complexity of the DTW distance computation by using a standard dynamic programming optimization. This optimization approach is applicable to almost all of our elastic distances (with minor or major additions).
The optimization drastically reduces the memory usage (from quadratic to linear complexity) and, due to higher data locality, also leads to a runtime speedup of ~2x.
Describe your proposed solution
We should apply the dynamic programming optimization described in #3257 to our other elastic distances as well.
For each distance,
- implement the optimization for the distance computation
- test whether the new implementation produces the same results as the original one
- perform a performance benchmark to demonstrate the memory reduction and runtime speedup
The following distances (also see sub-issues) should be optimized (in order from easy to more complex):
- DTW [ENH] Implement O(N) space complexity for dtw_distance #3258
- DDTW (for free with [ENH] Implement O(N) space complexity for dtw_distance #3258 because it calls
_dtw_distance()internally) - ADTW (additional
warp_penaltyparameter) - WDTW (additional
gparameter and different cost function) - SoftDTW (additional
gammaparameter and different cost function) - EDR (different margin initialization and cost function, additional
epsilonparameter) - ERP (different margin initialization and cost function, additional
gparameter) - LCSS (different margin initialization, uses other matrix references to compute cost, additional
epsilonparameter) - MSM (also dynamic programming, but requires a couple of additional modifications)
- TWE (also dynamic programming, but requires a couple of additional modifications)
ShapeDTW(not applicable because it operates on the full cost matrix)
raphaelgimenezneto
Sub-issues
Metadata
Metadata
Assignees
Labels
distancesDistances packageDistances packageenhancementNew feature, improvement request or other non-bug code enhancementNew feature, improvement request or other non-bug code enhancement