Last chance! 50% off unlimited learning
Sale ends in
DBA(X, center = NULL, max.iter = 20, norm = "L1", window.size = NULL,
delta = 1e-06, error.check = TRUE, trace = FALSE)
X
if NULL
.NULL
means no constraint.i
, if all(abs(center_{i}
- center_{i-1})
< delta)
,
convergence is assumed.TRUE
, the current iteration is printed to screen.If a given series reference is provided in center
, the algorithm should always converge to the same
result provided the rows of X
keep the same values, although their order may change.
# Sample data
data(uciCT)
# Obtain an average for the first 5 time series
dtw.avg <- DBA(CharTraj[1:5], CharTraj[[1]], trace = TRUE)
plot(dtw.avg, type="l")
# Change the provided order
dtw.avg2 <- DBA(CharTraj[5:1], CharTraj[[1]], trace = TRUE)
all(dtw.avg == dtw.avg2)
Run the code above in your browser using DataLab