PST (version 0.84.1)

ppplot: Plotting a branch of a probabilistic suffix tree

Description

The ppplot function displays the probability distributions of a node and all its parent nodes (suffixes) in the tree. IF the name of a gain function and a vector of pruning cutoffs are provided, the graphic will display the outcomes of the gain function, i.e., whether a node represents an information gain relative to its parent.

Usage

## S3 method for class 'PSTf':
ppplot(object, path, gain, C, cex.plot = 1, nsize = 0.3, nlab=TRUE,
	psize = nsize/2, pruned.col = "red", div.col = "green", ...)

Arguments

object
a probabilistic suffix tree, i.e., an object of class "PSTf" as returned by the pstree, prune or
path
character. Either a character string representing the node label (i.e., the context) where symbols are separated by '-', or a vector where each element is a symbol. See example.
gain
character or function. Gain function, see prune.
C
numeric. Value of the cutoff used by the gain function, see prune.
cex.plot
numeric. Expansion factor for setting the size of the font for the axis labels and names. The default value is 1. Values lesser than 1 will reduce the size of the font, values greater than 1 will increase the size.
nsize
numeric. Size of the circles representing the nodes.
nlab
logical. Should the node label be displayed inside the circle?
psize
numeric. Size of the circles representing the outcome of the gain function.
pruned.col
character. Color used to represent a terminal node which provides no information gain relative to its parent.
div.col
character. Color used to represent an internal node which provides information gain relative to its parent.
...
additional parameters to be passed to the plot function.

See Also

cplot, prune

Examples

Run this code
data(s1)
s1.seq <- seqdef(s1)
S1 <- pstree(s1.seq, L=5, ymin=0.001)
ppplot(S1, "a-a-b-b-a", gain="G1", C=c(1.1, 1.2))

Run the code above in your browser using DataCamp Workspace