Time-series clustering with multiple seeds automated

197 views Asked by At

i am trying to use time-series clustering, following the excellent examples of https://cran.r-project.org/web/packages/dtwclust/vignettes/dtwclust.pdf . However, when I use partitional clustering, the seed is very crucial to the results. Is there an automated way, to run the clustering with multiple seed and show the one that yields the lowest total inter-cluster distance?

Thanks

2

There are 2 answers

1
Alexis On BEST ANSWER

You can pass a control parameter with nrep > 1, that will use multiple seeds, and you can choose which result to keep based on your criteria (a list of clustering results will be returned). You still need to pass one "starting" seed to tsclust though.

Documentation here.

0
Has QUIT--Anony-Mousse On

Have you tried writing a for loop for this?

That is a great way to automate things!