Wavelet Transform

DESCRIPTION:
Computes a wavelet packet transform.

USAGE:
wpt(x, crystal.names=NULL, basis=NULL, cost.fun="entropy",
    wavelet="s8", n.levels=6, boundary=NULL,
    precondition=F, pdeg=0, pfrac=0, dual=F,
    analysis.filter=NULL, synthesis.filter=NULL,
    scale=NULL, thresh=NULL, p=2, prob=.5)
iwpt(x)

REQUIRED ARGUMENTS:
x:
for wpt, a time series or a numeric vector. For iwpt, an object of class "wpt".

OPTIONAL ARGUMENTS:
crystal.names:
a vector of character strings giving the names of the crystals to compute. The names should be of the form wj.b where j is the level (an integer between 0 and n.levels) and b is the oscillation index (an integer between 0 and 2^j).
basis:
a character string: "best.basis", "best.level", or "dwt". This determines how the wavelet packet transform is chosen: see the respective help files. If crystal.names is not null, then basis is ignored. If both crystal.names and basis are null, then the wavelet packet transform of level n.levels is computed.
cost.fun:
a character string specifying the cost functional, for basis="best.basis" or "best.level" only. Available cost functionals are: "entropy", "lp", "risk", "sure", and "threshold". See pcosts for details.
wavelet:
a character string giving the name of the wavelet, e.g. "d4", "s8". See wavelet for a list of all available wavelet names. For a user-provided filter, input the values in analysis.filter and synthesis.filter below.
n.levels:
a non-negative integer specifying number of multi-resolution levels. If n.levels is bigger than ml, where ml is the maximum possible level, then n.levels is set to ml and a warning message is given. The max.level function is used to compute ml.
boundary:
a character string giving the boundary rules, e.g. "periodic", "infinite", "zero". See details below for a list of available boundary rules.
precondition:
logical flag: for boundary="interval" only. If TRUE, then a preconditioning transform will be applied to the the data. The preconditioning transformation preserves the vanishing moments property when the DWT is applied to polynomial signals. See Cohen, Daubechies, and Vial (1993) for details.
pdeg:
for "infinite"only: degree of polynomial used for boundary extension.
pfrac:
for boundary="infinite"only: fraction of data used to fit a polynomial of degree pdeg.
dual:
logical flag indicating if dual filter is used for analysis instead of synthesis. This argument only applies for biorthogonal wavelets. See wavelet for details.
analysis.filter:
for user-defined analysis filter, see filter argument in wave.filter for details.
synthesis.filter:
for user-defined synthesis filter, see filter argument in wave.filter for details. When analysis.filter is provided, then the default synthesis.filter is also analysis.filter.
scale:
scaling factor for computing the costs. The default depends on cost.fun. See pcosts for details.
p:
a number in the interval (0,2] giving the degree of the lpnorm when cost.fun is "lp". See pcosts for details.
thresh:
a non-negative number giving the threshold for when cost.fun is "threshold" or "sure". See pcosts for details.
prob:
a number in the interval (0,1) used to compute the threshold for when cost.fun is "threshold". See pcosts for details.

VALUE:
an object of class "wpt", inheriting from the class "crystal.vector" or "crystal.list" (when boundary="infinite").

iwpt(x) performs the inverse transform from the wpt object x, as the generic function reconstruct does for wpt objects.


DETAILS:
If the argument crystal.names is supplied, then the wavelet packet transform is computed by first computing a wavelet packet table, and then subscripting the table. See wp.table for details.

See dwt, best.basis and best.level for details if the basis argument is provided.

Wavelet packet transforms are discussed in the chapter "Wavelet Packet Analysis of the S+WAVELETS User's Manual.

The default optional arguments for wavelet, n.levels, boundary, precondition, pdeg, pfrac, dual can be reset using function wavelet.options. See wavelet.options for details.


REFERENCES:
Wickerhauser, M. V. (1994). Adapted Wavelet Analysis -- from theory to software.

SEE ALSO:
best.basis , best.level , dwt , max.level , pcosts , reconstruct, wpt.object , wp.table .

EXAMPLES:
x <- make.signal("linchirp")
bbx <- wpt(x, basis="best.basis")
eda.plot(bbx)