I use following tsclust statement to cluster data
SURFSKINTEMP_CLUST <- tsclust(SURFSKINTEMP, k = 10L:20L,
distance = "dtw_basic", centroid = "dba",
trace = TRUE, seed = 938,
norm = "L2", window.size = 2L,
args = tsclust_args(cent = list(trace = TRUE)))
SURFSKINTEMP is very big,
str(SURFSKINTEMP)
List of 327239
$ V1 : num [1:7] 0.13 0.631 -0.178 0.731 0.86 ...
$ V2 : num [1:6] 0.117 -0.693 -0.911 -0.911 -0.781 ...
$ V3 : num [1:7] 0.117 -0.693 -0.911 -0.911 -0.781 ...
$ V4 : num [1:6] -0.693 -0.911 -0.911 -0.781 -0.604 ...
Then, I want use cvi to evaluate the optimum number of clusters “k”
names(SURFSKINTEMP_CLUST) <- paste0("k_",10L:20L)
sapply(SURFSKINTEMP_CLUST, cvi, type = "internal")
But, there have an errors
> sapply(SURFSKINTEMP_CLUST, cvi, type = "internal")
Error: cannot allocate vector of size 797.8 Gb
How can I evaluate the optimum number of clusters “k” in my case?