AvBasis.wst            package:wavethresh            R Documentation

_P_e_r_f_o_r_m _b_a_s_i_s _a_v_e_r_a_g_i_n_g _f_o_r (_p_a_c_k_e_t-_o_r_d_e_r_e_d) _n_o_n-_d_e_c_i_m_a_t_e_d _w_a_v_e_l_e_t _t_r_a_n_s_f_o_r_m.

_D_e_s_c_r_i_p_t_i_o_n:

     Perform basis averaging for (packet-ordered) non-decimated wavelet
     transform.

_U_s_a_g_e:

     AvBasis.wst(wst, Ccode=TRUE, ...)

_A_r_g_u_m_e_n_t_s:

     wst: An object of class 'wst' that contains coefficients of a
          packet ordered non-decimated wavelet transform (e.g. produced
          by the 'wst' function.

   Ccode: If TRUE then fast compiled C code is used to perform the
          transform. If FALSE then S code is used. Almost always use
          the default TRUE option. (It is conceivable that some
          implementation can not use the C code and so this option
          permits use of the slower S code).

     ...: any other arguments

_D_e_t_a_i_l_s:

     The packet-ordered non-decimated wavelet transform computed by
     'wst' computes the coefficients of an input vector with respect to
     a library of all shifts of wavelet basis functions at all scales.
     Here "all shifts" means all integral shifts with respect to the
     finest scale coefficients, and "all scales" means all dyadic
     scales from 0 (the coarsest) to J-1 (the finest) where '2^J = n'
     where 'n' is the number of data points of the input vector. As
     such the packet-ordered non-decimated wavelet transform contains a
     library of all possible shifted wavelet bases.

     'Basis selection' It is possible to select a particular basis and
     invert that particular representation. In WaveThresh a basis is
     selected by creating a 'nv' (node.vector) class object which
     identifies the basis. Then the function 'InvBasis' takes the
     wavelet representation and the node.vector and inverts the
     representation with respect to the selected basis. The two
     functions 'MaNoVe' and 'numtonv' create a node.vector: the first
     by using a 'Coifman-Wickerhauser' minimum entropy best-basis
     algorithm and the second by basis index. 

     *Basis averaging*. Rather than select a basis it is often useful
     to preserve information from all of the bases. For example, in
     curve estimation, after thresholding a wavelet representation the
     coefficients are coefficients of an estimate of the truth with
     respect to all of the shifted basis functions. Rather than select
     _one_ of them we can average over all estimates. This sometimes
     gives a better curve estimate and can, for example, get rid of
     Gibbs effects. See Coifman and Donoho (1995) for more information
     on how to do curve estimation using the packet ordered
     non-decimated wavelet transform, thresholding and basis averaging. 

     Further it might seem that inverting each wavelet transform and
     averaging might be a computationally expensive operation: since
     each wavelet inversion costs order n operations and there are n
     different bases and so you might think that the overall order is
     n^2. It turns out that since many of the coarser scale basis
     functions are duplicated between bases there is redundancy in the
     non-decimated transform. Coifman and Donoho's TI-denoising
     algorithm makes use of this redundancy which results in an
     algorithm which only takes order nlogn operations. 

     For an example of denoising using the packet-ordered non-decimated
     wavelet transform and basis averaging see Johnstone and Silverman,
     1997. The WaveThresh implementation of the basis averaging
     algorithm is to be found in Nason and Silverman, 1995

_V_a_l_u_e:

     A vector containing the average of the wavelet representation over
     all the basis functions. The length of the vector is '2^nlev'
     where 'nlev' is the number of levels in the input 'wst' object.

_R_E_L_E_A_S_E:

     Version 3.6.0 Copyright Guy Nason 1995

_S_e_e _A_l_s_o:

     'wst', 'wst.object', 'MaNoVe',  'numtonv', 'InvBasis'.

_E_x_a_m_p_l_e_s:

     #
     # Generate some test data
     #
     test.data <- example.1()$y
     #
     # Now take the packet-ordered non-decimated wavelet transform
     #
     tdwst <- wst(test.data)
     #
     # Now "invert" it using basis averaging
     #
     tdwstAB <- AvBasis(tdwst)
     #
     # Let's compare it to the original
     #
     sum( (tdwstAB - test.data)^2)
     #
     # [1] 9.819351e-17 
     #
     # Very small. They're essentially same.
     #
     # See the threshold.wst help page for an
     # an example of using basis averaging in curve estimation.

