Description Usage Arguments Value Note Author(s) See Also Examples
visualizePattern
visualizes the patterns implied by the terminal
nodes of the trees from learnPattern
object.
1 | visualizePattern(object, x, which.terminal, orient=c(2,2))
|
object |
an object of class |
x |
a data frame or matrix containing the data for pattern visualization. |
which.terminal |
id of the terminal node determining the decision rules to be used for identifying patterns |
orient |
orientation of the plot (determines the grid structure and how many patterns to be visualized). |
A list with the following components are returned invisibly.
predictor |
predictor segments residing in the |
target |
target segments implied by the |
tree |
the tree id corresponding to the |
terminal |
the id of the terminal node for the |
Patterns are visualized for the time series for which the frequency of the
observations in the pattern is the largest. If more than one plot is requested
through the setting of orient
, the patterns are plotted for the time
series based on the descending order of the frequency.
Currently, patterns are visualized based on the first predictor segment (sampled at the root node). This visualization can be done based on the predictor segment sampled at each level of the tree.
predictor
and target
are of size x
where the patterns
are numerical values and the rest of the entries are NA
s.
Mustafa Gokce Baydogan
learnPattern
,predict.learnPattern
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | set.seed(71)
data(GunPoint)
## Learn patterns on GunPoint training series with default parameters
ensemble=learnPattern(GunPoint$trainseries)
## Find representations
trainRep=predict(ensemble, GunPoint$trainseries, nodes=TRUE)
## Find the average frequency over the terminal nodes
avgFreq=apply(trainRep,2,mean)
## Find the terminal node that has the maximum average and visualize
termid=which.max(avgFreq)
visualizePattern(ensemble,GunPoint$trainseries,termid,c(2,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.