Export or save tsclust model

120 views Asked by At

I am doing a time-series clustering on a large dataset (3000 time-series, with > 50 points each). Thus, I was wondering if once I have finished the analysis, it would be possible to:

  • export the model so that I can cluster new series swiftly.
  • export the "centroids" so that I can use them as the template for matching new series.

A simple MRE could look like this

my_matrix <- matrix(rnorm(1000), 100, 10)
k <- 5
clustering <- tsclust(my_matrix , k = k, trace = T)
# somehow saveRDS(clustering)

# new series coming

y <- rnorm(10)
my_clusters <- loadRDS(clustering)
# Somehow clusternew(y, my_clusters)

Thank you, S

0

There are 0 answers