Learn R Programming

adlift (version 0.8-2)

UndoPointsUpdate: UndoPointsUpdate

Description

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

Usage

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

Arguments

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.

Value

  • coeffvector of (modified) detail and scaling coefficients to be used later in the transform.
  • lengthsvector of interval lengths after inverting the update step of the transform.
  • alphathe weights used to modify lengths and coeff.

Details

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.

See Also

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

Examples

Run this code
#
# 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])
#

Run the code above in your browser using DataLab