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, filter.reverse=F, scale=NULL, thresh=NULL, p=2, prob=.5) iwpt(x)
wpt
, a time series or a numeric vector. For
iwpt
,
an object of class
"wpt"
.
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
).
"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.
basis="best.basis"
or
"best.level"
only.
Available cost functionals are:
"entropy"
,
"lp", "risk", "sure"
, and
"threshold"
.
See
pcosts
for details.
"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
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
.
"periodic"
,
"infinite"
,
"zero"
. See details below for a list of available
boundary rules.
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.
"infinite"
only:
degree of polynomial used for boundary extension.
boundary="infinite"
only:
fraction of data used to fit a polynomial of degree
pdeg
.
wavelet
for details.
filter
argument in
wave.filter
for
details.
filter
argument in
wave.filter
for
details. When
analysis.filter
is provided, then the default
synthesis.filter
is also
analysis.filter
.
dwt
for details.
cost.fun
.
See
pcosts
for details.
(0,2]
giving the degree of the
lpnorm when
cost.fun
is
"lp"
.
See
pcosts
for details.
cost.fun
is
"threshold"
or
"sure"
.
See
pcosts
for details.
(0,1)
used to
compute the threshold for when
cost.fun
is
"threshold"
.
See
pcosts
for details.
"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.
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.
Wickerhauser, M. V. (1994). Adapted Wavelet Analysis from Theory to Software. A. K. Peters Ltd, Wellesley, MA.
x <- make.signal("linchirp") bbx <- wpt(x, basis="best.basis") eda.plot(bbx)