tslearn-team / tslearn-team/tslearn
Global constraints (Sakoe-Chiba/Itakura) for subsequence search
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 384
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem? Please describe.
The method dtw_path accepts one of two optional global constraints (preventing "pathological" matches). However, dtw_subsequence_path doesn't (because the compute mask function assumes two series of equal length).
Describe the solution you'd like
Adding this constraint would be really useful. There is a precedent, the team at UCR has an implementation of DTW subsequence search with a warp window as a fraction of the series length (the source is in C, I think the cost matrix is here). I could try to have a go at this but it might take me a while.
Thanks for all your work on this very useful library!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the dtw_path and dtw_subsequence_path entry points, then inspect the compute mask function to understand its equal-length assumption. Compare the requested behavior with the linked UCR implementation and its cost-matrix logic. The work is done when subsequence search accepts the global constraints and constrained paths avoid pathological matches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100