tslearn icon indicating copy to clipboard operation
tslearn copied to clipboard

Add LCSS as a distance metric in TimeSeriesKMeans

Open pushkar5586 opened this issue 3 years ago • 4 comments

Hi,

Is there a plan to support Longest Common Subsequence (LCSS) as a distance/similarity metric in the TimeSeriesKMeans model?

Many thanks.

pushkar5586 avatar Dec 08 '22 06:12 pushkar5586

This page says:

"This is the algorithm at stake when invoking tslearn.clustering.TimeSeriesKMeans with metric="lcss""

but, upon instantiating an object of type tslearn.clustering.TimeSeriesKMeans with metric="lcss", I get an exception saying that the only supported metric values are "euclidean", "dtw" and "dtw-soft".

I looked into the code of tslearn.clustering.TimeSeriesKMeans and LCSS isn't supported in there.

Would appreciate if anyone could share a timeline for an upgraded version of tslear with LCSS supported in its clustering models.

pushkar5586 avatar Dec 08 '22 11:12 pushkar5586

Hello, I am following-up on this issue regarding the integration of 'lcss' metric in tslearn.clustering.TimeSeriesKMeans. I indeed found that this integration is mentioned in the tslearn documentation release, but has not been effectively integrated.

I think it will be a great addition, as partitioning clustering algorithms depends heavily on the distance metric used, and as LCSS has proved to be more performant on noisy time-series whose length can differ greatly.

Many thanks in advance for the answer regarding this issue,

AMDonati avatar Nov 10 '23 08:11 AMDonati

you can use the sktime TimeSeriesKMeans it supports the lcss metric https://www.sktime.net/en/stable/api_reference/auto_generated/sktime.clustering.k_means.TimeSeriesKMeans.html

Arabiteff avatar Jan 14 '24 10:01 Arabiteff