tree.plot(basis, uniform=F, vshift=.02, min.cost=.01)
"cpt"
or
"wpt"
.
TRUE
, then
costs
will be ignored
and the arcs in the tree will have uniform length.
(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
.
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
Arguments
cumcosts
and
balanced
are deprecated and
should not be used.
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)