cpt(x, crystal.names=NULL, basis=NULL, cost.fun="entropy", n.levels=6, taper="poly2", dct.type=2, boundary="periodic", n.taper=NULL, scale=NULL, thresh=NULL, p=2, prob=.5) icpt(x)
icpt
only, an object of class
cpt
.
"cj.b"
where
j
is an integer giving the level and
b
is an integer from
0
to
2^j-1
giving the block number within level
j
.
If
crystal.names
is supplied, then
basis
is ignored.
"best.basis"
,
"best.level"
,
"block.dct"
, or
"block.cpt"
.
See the corresponding function for details.
"entropy"
,
"threshold"
,
"sure"
, and "
lp
" are available.
Only used for
"best.basis"
.
See
pcosts
for details.
x
is divided into
2^n.levels
blocks each of length
length(x)/2^n.levels
.
For
"best.basis"
,
n.levels
gives the blocking factor for the finest level.
If
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.
2
or
4
indicating which of DCT-II or DCT-IV should be used.
See the function
dct
for details.
"boxcar", "poly1", "poly2", "poly3", "poly4", "poly5"
, or
"trig"
.
See the function
cp.table
for details.
"cp.reflect", "periodic"
and
"zero"
.
See the function
cp.table
for details.
2*n.taper
.
By default,
n.taper
is set to
length(x)/2^(n.level+1)
,
which is the maximum possible length at the finest blocking level.
cost.fun
.
See the function
pcosts
for details.
(0,2]
giving the degree of the
lpnorm when
cost.fun
is
"lp"
.
See the function
pcosts
for details.
cost.fun
is
"threshold"
or
"sure"
.
See the function
pcosts
for details.
(0,1)
used to
compute the threshold for when
cost.fun
is
"threshold"
.
See the function
pcosts
for details.
cpt
, inheriting from the class
crystal.vector
.
icpt(x)
performs the inverse transform from the
cpt
object
x
,
as the generic function
reconstruct
does for
cpt
objects.
The algorithms for the taper functions are given in the
S+WAVELETS User's Manual,
in the section "Cosine Packet Algorithms". They are discussed in
greater depth in Wickerhauser (1994).
The default optional arguments
n.levels, taper, dct.type, boundary
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 <- cpt(x, basis="best.basis") eda.plot(bbx)