I have a time-series dataset and I am required to find similar clusters in the data.
Based on my current knowledge and the requirements of my application, I used SBD
measure (shape based distance) to calculate the dissimilarity matrix for my dataset and applied hierarchical clustering on it (using tsclust
).
The R command used is:
library(dtwclust)
hclust=tsclust(mydata,type="h", distance = "sbd")
I also used cvi
for cluster validation (cvi(hclust)
) and was able to get a value of 0.508 for Silhouette width (which I believe is good enough). The problem is that I don't know at which point to cut this cluster tree - for how many clusters (value of k
) or at what height (value of h
) to get the Silhouette width of 0.5?
Moreover, once I know this value of k
or h
, how do I find the centroids (time-series data) that represent these clusters?