Compute Wavelet or Cosine Packet Costs

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

This function is generic (see Methods); method functions can be written to handle specific 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.

See the printed help file for the definitions of the cost functionals listed below.

Available cost functionals:

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.

SEE ALSO:
best.basis , best.level , cp.costs.2d , cp.table , pcosts.object, wp.costs.2d , wp.table .