cp.table(x, cost.fun="entropy", n.levels=6, taper="poly2",
dct.type=2, boundary="periodic", n.taper=NULL,
scale=NULL, thresh=NULL, p=2, prob=.5)
as.ptable(x)
as.ptable only,
an object of
ptable, cpt, cp.molecule.
When
x is a vector or univariate time series,
the length of
x should be divisible by
2^n.levels and
should demean first.
"entropy",
"threshold",
"sure", and "
lp" are available.
See
pcosts for details.
x is divided into
2^n.levels blocks each of length
length(x)/2^n.levels.
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 details below for the definitions of these tapers.
"cp.reflect", "periodic"
and
"zero".
See details below for the definitions of these rules.
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
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.
0 to
n.levels.
The attribute
pcosts
is a numeric vector of length
2^(n.levels+1)-1
of "costs" based on
cost.fun.
Additional information about the transform is
stored in attribute
dictionary.
The returned cosine packet table
has class
ptable, inheriting from classes
cp,
and
crystal.vector.
See
crystal.vector.object for details about the data structure.
as.ptable
returns
x, if
x is an object of
ptable or
cpt.
A cosine packet table is a redundant non-invertible
transform of the data.
Invertible orthogonal transforms can be selected
from a packet table using the
best.basis function
and the
Subscript operators.
The
jth level of a
cosine packet table is equivalent to result from
the
block.cpt function with
n.levels=j.
A cosine packet crystal corresonds to the DCT applied
to a tapered block of the original signal.
Overall,
a cosine packet table contains
2^(n.levels+1)-1
cosine packet crystals.
Each crystal has a
crystal.name of the form
cj.b
where
j is the level and
b is the block within
level.
You can subscript an entire level of a cosine packet table,
or you can subscript sets of crystals either by
position or name.
Available tapers:
the taper is a discontinuous "boxcar" function, and is equivalent to no tapering on the block.
poly1 has one continuous derivative.
The tapers
poly2 to
poly5 have
two to five continuous derivatives respectively. the series is reflected (and then periodically extended). For perfect reconstruction, symmetric/antisymmetric wavelets are needed.
2^(n.levels). cp.table and cosine packet analysis.
The default optional arguments
n.levels, taper, dct.type, boundary
can be reset using function
wavelet.options, see
wavelet.options for details.
Coifman, R., Meyer, Y., Quake, S. and Wickerhauser, M. V. (1990). Signal processing and compression with wavelet packets. Technical report, Yale University.
Coifman, R. and Wickerhauser, V. (1992). Entropy-based algorithms for best basis selection. IEEE Transactions on Information Theory Vol. 38(2), pages 713-718.
Wickerhauser, M. V. (1994). Adapted Wavelet Analysis from Theory to Software. A. K. Peters Ltd, Wellesley, MA.
xx <- make.signal("linchirp", 512)
yc <- cp.table(xx, taper="trig", n.levels=4)
eda.plot(yc)