time-series-classification-and-clustering icon indicating copy to clipboard operation
time-series-classification-and-clustering copied to clipboard

How to return cluster labels for data sampled.

Open aramcb opened this issue 2 years ago • 0 comments

I see that tslearn.clustering natively supports dynamic time warping via TimeSeriesKMeans.

However, TimeSeriesKMeans is quite slow. I would like to use this implementation which from the code looks like it has more optimization via locality constraints. I'm not sure it's actually faster but I have my fingers crossed it is.

Can someone point me to how I can use @alexminnaar's implementation to output cluster labels per series?

I can see that this implementation robustly outputs the average cluster curves but I don't see it outputting the labels for the entire time series data.

I suspect it is in this block, but I'm having trouble parsing it. if closest_clust in assignments: assignments[closest_clust].append(ind) else: assignments[closest_clust]=[]

Any pointers would be appreciated.

aramcb avatar Dec 29 '22 19:12 aramcb