if (FALSE) {
data(uciCT)
set.seed(832)
GAKd <- proxy::dist(zscore(CharTraj), method = "gak",
pairwise = TRUE, window.size = 18L)
# Obtained estimate of sigma
sigma <- attr(GAKd, "sigma")
# Use value for clustering
tsclust(CharTraj, k = 20L,
distance = "gak", centroid = "shape",
trace = TRUE,
args = tsclust_args(dist = list(sigma = sigma,
window.size = 18L)))
}
# Unnormalized similarities
proxy::simil(CharTraj[1L:5L], method = "ugak")
Run the code above in your browser using DataLab