Unlimited learning, half price | 50% off
Get 50% off unlimited learning

IncDTW (version 1.0.2)

plot_idtw: Plot the results from Dynamic Time Warping

Description

plot function for the output of dtw and idtw

Usage

# S3 method for idtw
plot(x, type = "QC", ...)
# an alias for plot_idtw
plot_idtw(x, type="QC", ...)

plotQC(x, Q, C, ...)

plotWarp(x, Q, C, ...)

Arguments

x

output from dtw(Q, C)

Q

one dimensional numeric vector

C

one dimensional numeric vector

type

character, one of c('QC', 'warp')

...

Other arguments passed on to methods. Not currently used.

Details

The plot function visualizes the time warp and the alignment of the two time series.

Examples

Run this code
# NOT RUN {
Q <- cumsum(rnorm(100))
C <- Q[11:100] + rnorm(90, 0, 0.5)
tmp <- dtw(Q = Q, C = C, ws = 15, return_wp = TRUE, return_QC = TRUE) # the ordinary calculation
plotQC(tmp, Q, C)
plotWarp(tmp, Q, C)
plot(tmp, type = 'warp')
plot(tmp, Q, C, type = 'QC')
plot(tmp, type = 'QC')# since return_QC = TRUE, this is also possible
# }

Run the code above in your browser using DataLab