# NOT RUN {
data("drink_glass")
# initialize with any time series
m1 <- DBA(lot = drink_glass[1:10], m0 = drink_glass[[1]],
dist_method = "norm2", iterMax = 20)
# initialize with the centroid
tmp <- centroid(drink_glass)
cent <- drink_glass[[tmp$centroid_index]]
m1 <- DBA(lot = drink_glass[1:10], m0 = cent,
dist_method = "norm2", iterMax = 20)
plot(sapply(m1$iterDist_m2lot, mean), xlab = "Iterations",
ylab = "mean distance",
main = "Distance of updated bary center to lot")
plot(m1$iterDist_m2m, ylab = "distance", xlab = "Iterations",
main = "Distance of iterations of bary center updates")
plot(m1)
plot(m1, type = "m2m")
plot(m1, type = "m2lot")
# }
Run the code above in your browser using DataLab