Tree Plot for Packet Basis Selection

DESCRIPTION:
Graphical display of the relative importance of the splits in a wavelet or cosine packet basis.

USAGE:
tree.plot(basis, uniform=F, vshift=.02, min.cost=.01)

REQUIRED ARGUMENTS:
basis:
an wavelet packet transform or cosine packet transform object of class "cpt" or "wpt".

OPTIONAL ARGUMENTS:
uniform:
logical flag: if TRUE, then costs will be ignored and the arcs in the tree will have uniform length.
vshift:
a number between 0 and 1 which sets the plotting range for the y-axis. The y range is increased by (1+vshift)*maxheight at the top and bottom of the plot where maxheight is the height of the tree. The ranges are set with the usr argument to par.
min.cost:
The minimum length of an arc as a proportion of the total height of the tree.

VALUE:
the tree is returned as a matrix.

DETAILS:
The function tree.plot is useful for selecting bases from wavelet packet and cosine packet tables. It displays the relative costs (e.g. entropy) as given by the pcosts attribute of the transform. See pcosts for available cost functions.

The length of the arcs between nodes indicates the cost "savings" acheived by splitting the parent node. Long arcs correspond to "important" splits. See the section "The Best Basis Algorithm" of the S+WAVELETS User's Manual for more details


BUGS:
Arguments cumcosts and balanced are deprecated and should not be used.

SEE ALSO:
best.basis , pcosts , wp.table , cp.table .

EXAMPLES:
yy <- make.signal("twochirp", 128)
ww <- wp.table(yy, wavelet="s8", boundary="zero")
bb <- best.basis(ww)          # select the best basis
tree.plot(bb)                 # tree plot for the best basis

ww.dwt <- as.dwt(ww) # extract DWT coefficients from wp.table tree.plot(ww.dwt)