Compute Wavelet or Cosine Packet Costs

DESCRIPTION:

Computes a wavelet packet cost table or a cosine packet cost table.

This function is an S Version 3 generic (see Methods); method functions can be written to handle specific S Version 3 classes of data. Classes which already have methods for this function include:
crystal.list, crystal.matrix, crystal.vector, ptable .

USAGE:

pcosts(x, cost.fun="entropy", scale=NULL, thresh=NULL, p=2, prob=.5) 

REQUIRED ARGUMENTS:

x
a numeric vector or an object of class ptable, crystal.vector, crystal.list, or crystal.matrix.

OPTIONAL ARGUMENTS:

cost.fun
character string indicating which cost functional to use: "energy", "entropy", "lp", "risk", "sure", "threshold". See details below.
scale
scaling factor for computing the costs. The default depends on cost.fun. See below for details.
thresh
a non-negative number, needed when cost.fun is "threshold" or "sure". For "threshold", the default is determined by the argument prob. For "sure", the default is sqrt(2 * log(n *log(n, 2))) where n is length of x.
p
a number in the interval (0,2] giving the degree of the Lp-norm when cost.fun is "lp". See below for details.
prob
a number in (0,1) used to compute thresh when cost.fun is "threshold". By default, thresh is the probth quantile of the absolute value of x.

VALUE:

A vector of costs with class pcosts. See pcosts.object for details.

DETAILS:

Cost tables are used to compute "best basis" transforms from wavelet packet and cosine packet tables.



Available cost functionals:

energy

The sum of the squares of the elements of x.

entropy
a function of x and scale .
lp
the usual Lp norm computed by vecnorm() .
risk
minimax linear risk, related to scale.
sure
Stein's Unbiased Risk Estimate, based on thresh.
threshold
number of coefficients above thresh (in absolute value).

Refer to the section "The Best Basis Algorithm" in the S+WAVELETS User's Manual for more details.

REFERENCES:

Wickerhauser, M. V. (1994). Adapted Wavelet Analysis from Theory to Software. A. K. Peters Ltd, Wellesley, MA.

SEE ALSO:

, , , , , , .