Learn R Programming

wavethresh (version 4.7.3)

InvBasis.wst: Invert a wst library representation with a basis specification

Description

Inverts a wst basis representation with a given basis specification, for example an output from the MaNoVe function.

Usage

# S3 method for wst
InvBasis(wst, nv, ...)

Value

The inverted reconstruction

Arguments

wst

The wst object that you wish to invert

nv

The node vector, basis spec, that you want to pick out

...

Other arguments, that don't do anything here

Author

G P Nason

Details

Objects arising from a wst.object specification are a representation of a signal with respect to a library of basis functions. A particular basis specification can be obtained using the numtonv function which can pick an indexed basis function, or MaNoVe.wst which uses the Coifman-Wickerhauser minimum entropy method to select a basis. This function takes a wst.object and a particular basis description (in a nv.object node vector object) and inverts the representation with respect to that selected basis.

See Also

numtonv,nv.object,MaNoVe.wst,threshold.wst,wst

Examples

Run this code
#
# Let's generate a noisy signal
#
x <- example.1()$y + rnorm(512, sd=0.2)
#
# You can plot this if you like
#
if (FALSE) ts.plot(x)
#
# Now take the nondecimated wavelet transform
#
xwst <- wst(x)
#
# Threshold it
#
xwstT <- threshold(xwst)
#
# You can plot this too if you like
#
if (FALSE) plot(xwstT)
#
# Now use Coifman-Wickerhauser to get a "good" basis
#
xwstTNV <- MaNoVe(xwstT)
#
# Now invert the thresholded wst using this basis specification
#
xTwr <- InvBasis(xwstT, xwstTNV)
#
# And plot the result, and superimpose the truth in dotted
#
if (FALSE) ts.plot(xTwr)
if (FALSE) lines(example.1()$y, lty=2)

Run the code above in your browser using DataLab