Description Usage Arguments Value Examples
This function create a data set for the use of visualizing the univariate motifs discovered
1 | Func.visual.SingleMotif(single.ts, window.size, motif.indices)
|
single.ts |
is a numeric vector used to represent the univariate time series |
window.size |
is the window size used to create subsequences. It is also the length of univariate motifs |
motif.indices |
is the results of Func.motif()$Indices, which store the starting position of subsequences for each univaraite motifs |
The function returns a list of three elements. The first element is data.1, which can be used to show the whole time series with motifs identifed highlighted. The second element is data.2, which can be used to visualize the members of each motif. It is a list containing data frames. Each data frame is designed to visualize the members in each motif.
1 2 3 4 5 6 7 8 9 10 11 12 | data(test)
#Perform univariate motif discovery for the first dimension data in the example data
res.1 <- Func.motif(ts = test$TS1, global.norm = TRUE, local.norm = FALSE,
window.size = 10, overlap = 0, w = 5, a = 3, mask.size = 3, eps = .01)
data.vis <- Func.visual.SingleMotif(single.ts=test$TS1, window.size=10, motif.indices=res.1$Indices)
#To visualize general information of motifs discovered on the whole time series
library(ggplot2)
ggplot(data = data.vis$data.1) +
geom_line(aes(x = 1:dim(data.vis$data.1)[1], y = X)) +
geom_point(aes(x = 1:dim(data.vis$data.1)[1], y = X, color=Y))
#To visualize the detailed information of the 1st motif
ggplot(data = data.vis$data.2[[1]]) + geom_line(aes(x = Time, y = Value, linetype=Instance))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.