UndoPointsUpdate           package:adlift           R Documentation

_U_n_d_o_P_o_i_n_t_s_U_p_d_a_t_e

_D_e_s_c_r_i_p_t_i_o_n:

     This function undoes the update lifting step in the inverse
     transform.

_U_s_a_g_e:

     UndoPointsUpdate(X, coeff, nbrs, index, remove, r, N, pointsin, gamweights,
      lengths, lengthrem)

_A_r_g_u_m_e_n_t_s:

       X: the vector of grid values.

   coeff: the vector of detail and scaling coefficients at that step of
          the transform.

    nbrs: the indices (into 'X') of the neighbours to be used in the
          lifting step.

   index: the indices into 'pointsin' of 'nbrs', the neighbours of
          'remove', the point to be added.

  remove: the index (into 'X') of the point to be added.

       r: the index into 'pointsin' of the added point, 'remove'.

       N: length('pointsin').

pointsin: The indices of gridpoints still to be added.

gamweights: the prediction weights obtained from the regression in the
          prediction step of the transform.

 lengths: the vector of interval lengths at the present step of the
          transform.

lengthrem: the interval length associated to the point to be added.

_D_e_t_a_i_l_s:

     This procedure uses minimum norm update coefficients to invert the
     update step of the transform. The prediction weights are used to
     change the interval lengthsm before the update weights are used to
     modify 'coeff'.

_V_a_l_u_e:

   coeff: vector of (modified) detail and scaling coefficients to be
          used later in the transform.

 lengths: vector of interval lengths after inverting the update step of
          the transform.

   alpha: the weights used to modify 'lengths' and 'coeff'.

_A_u_t_h_o_r(_s):

     Matt Nunes (matt.nunes@bristol.ac.uk), Marina Popa
     (Marina.Popa@bristol.ac.uk)

_S_e_e _A_l_s_o:

     'AdaptNeigh', 'AdaptPred', 'CubicPred', 'invtnp', 'LinearPred',
     'PointsUpdate', 'QuadPred'

_E_x_a_m_p_l_e_s:

     #
     # Generate some blocks data: 100 observations.
     #
     x <- runif(100)
     y <-make.signal2("blocks",x=x)
     #
     #find initial interval lengths...
     #
     I<-intervals(x,"reflect")
     l<-lengthintervals(x,I$intervals,neighbours=2,closest=FALSE)
     lengths<-l$lengths
     #
     #perform prediction step...
     p<-AdaptNeigh(order(x),x,y,32,5,TRUE,2)
     #
     #
     u<-PointsUpdate(x,p$results[[6]],p$newinfo[[3]],p$newinfo[[4]],5,order(x),p$results[[4]],
     lengths,"add")
     #
     p2<-setdiff(order(x),5)
     a<-which(order(x)==5)
     l2<-lengths[setdiff(1:100, a)]
     #
     #remove the lifted coefficient
     #
     #now undo the update step...
     #
     undo<-UndoPointsUpdate(x,u$coeff,p$newinfo[[3]],p$newinfo[[4]],5,a,99,p2,p$results[[4]],l2,
     lengths[a])
     #

