wp.costs.2d(x, cost.fun="entropy", wavelet="s8", n.levels=4,
boundary="periodic", precondition=F, dual=F,
analysis.filter=NULL, synthesis.filter=NULL,
scale=NULL, thresh=NULL, p=2, prob=.5)
"entropy",
"threshold",
"risk",
"sure", and "
lp" are available.
See below for details.
wavelet.packet for a list of all available wavelet names.
If the length of
wavelet is one,
the same wavelet is used for both rows and columns.
For user-provided filter, input the values the
filter argument (see below).
n.levels is bigger than
ml, where
ml is the maximum possible level,
computed from the
max.level function, then
n.levels is set to
ml and
a warning message is given.
boundary is one, the same boundary rule is used for both
row and column.
All the boundary rules listed for
dwt are available except for
"infinite" and
"polynomial".
See
dwt for the definitions of these rules.
boundary="interval" only.
See
dwt for details.
cost.fun. See below for details.
cost.fun is
"threshold" or
"sure".
See below for details.
(0,2] giving the degree of the
lpnorm when
cost.fun is
"lp". See below for details.
(0,1), needed when
cost.fun is
"threshold".
See below for details.
pcosts.2d.
A packet cost object can be used with
the
best.basis function to select optimal wavelet packet
transforms for images.
Available cost functionals:
entropy
a function of
x and
scale.
lp
the usual
Lp norm,
risk
minimax linear risk.
sure
Stein's Unbiased Risk Estimate.
threshold
number of coefficients above a
threshold.
phone <- phone-mean(phone) wcost <- wp.costs.2d(phone, wavelet="s8", n.levels=3) bb2 <- best.basis(wcost, data=phone) bb2 plot(bb2)