tslearn-team / tslearn-team/tslearn

Silhouette Score takes close to exponential time when using dtw/soft-dtw

Open
#408 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
3.2k
Forks
384
Avg merge
3d 12h
Merged PRs (30d)
11

Description

Hi, I am trying to train my model on 25,000 rows of time series data with each row having data for over 60 time-intervals. It is taking 2+ hours to fit and predict using kMeans & soft-dtw as distance metric. However, since I need to find optimal number of clusters, I need to run the algorithm for clusters 3-10 and calculate silhouette score each time.

Calculation of silhouette score is taking 3+ hours. Is there a way to speed this up? Also, how can I speed up this entire process?
How can I parallelize both soft-dtw and silhouette score?

Any suggestions would be much appreciated.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by profiling the silhouette-score calculation and the soft-DTW path used with kMeans on the reported 25,000-by-60 data. Compare runtime across cluster counts 3–10 and investigate whether parallelization changes the bottleneck. Done would require a specific, validated performance improvement, but the issue does not identify files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.