draw.vlmc {mixvlmc} | R Documentation |
Text based representation of a vlmc
Description
This function 'draws' a context tree as a text.
Usage
## S3 method for class 'vlmc'
draw(ct, control = draw_control(), prob = TRUE, ...)
## S3 method for class 'vlmc_cpp'
draw(ct, control = draw_control(), prob = TRUE, ...)
Arguments
ct |
a fitted vlmc. |
control |
a list of low level control parameters of the text
representation. See details and |
prob |
this parameter controls the display of node level information in
the tree. The default |
... |
additional arguments for draw. |
Details
The function uses basic "ascii art" to represent the context tree. Characters
used to represent the structure of the tree, e.g. branches, can be modified
using draw_control()
.
In addition to the structure of the context tree, draw
can represent
information attached to the node (contexts and partial contexts). This is
controlled by additional parameters depending on the type of the context
tree.
Value
the context tree (invisibly).
Examples
dts <- sample(c("A", "B", "C"), 500, replace = TRUE)
model <- vlmc(dts, alpha = 0.05)
draw(model)
draw(model, prob = FALSE)
draw(model, prob = NULL)