Last chance! 50% off unlimited learning
Sale ends in
SBD(x, y, znorm = FALSE, error.check = TRUE)
dist
: The shape-based distance between x
and y
.
yshift
: A shifted version of y
so that it optimally matches x
(based
on correlation).
If x
and y
do not have the same length, it would be best if the longer
sequence is provided in y
, because it will be shifted to match x
. After matching,
the series may have to be truncated or extended and padded with zeros if needed.
The output values lie between 0 and 2, with 0 indicating perfect similarity.
NCCc
, shape_extraction
# load data
data(uciCT)
# distance between series of different lengths
sbd <- SBD(CharTraj[[1]], CharTraj[[100]], znorm = TRUE)$dist
# cross-distance matrix for series subset (notice the two-list input)
sbD <- proxy::dist(CharTraj[1:10], CharTraj[1:10], method = "SBD", znorm = TRUE)
Run the code above in your browser using DataLab