Description Usage Arguments Details Value Author(s) See Also Examples
This function performs the update lifting step using a given configuration of neighbours and boundary handling.
1 2 | PointsUpdatemp(X, coeff, nbrs, newnbrs, index, remove, pointsin,
weights, lengths)
|
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. |
newnbrs |
as nbrs, but repeated according to the multiple point structure of the grid. |
index |
the indices into pointsin of nbrs, the neighbours of remove. |
remove |
the index (into X) of the point to be removed. |
pointsin |
The indices of gridpoints still to be removed. |
weights |
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 (to be updated). |
The procedure performs a minimum norm update lifting step. Firstly the interval lengths are updated using the coefficients obtained. Secondly, the scaling and detail coefficient list is modified using the new interval lengths.
coeff |
vector of (modified) detail and scaling coefficients to be used in the next step of the transform. |
lengths |
the vector of interval lengths after the update step of the transform. |
r |
the index into pointsin of remove. |
N |
length(pointsin). |
weights |
The regression coefficients used in prediction. |
alpha |
the update weights used to update lengths and coeff. |
Matt Nunes (nunesrpackages@gmail.com), Marina Knight
AdaptNeighmp
, AdaptPredmp
, CubicPredmp
, fwtnpmp
, LinearPredmp
,
QuadPredmp
, UndoPointsUpdatemp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #read in data with multiple values...
data(motorcycledata)
times<-motorcycledata$time
accel<-motorcycledata$accel
short<-adjustx(times,accel,"mean")
X<-short$sepx
coeff<-short$sepx
g<-short$g
coefflist<-list()
for (i in 1:length(g)){
coefflist[[i]]<-accel[g[[i]]]
}
I<-intervals(X,"reflect")
lengths<-lengthintervals(X,I,neighbours=2,closest=TRUE)
#work out neighbours of point to be removed (31)
out<-getnbrs(X,31,order(X),2,TRUE)
nbrs<-out$n
nbrs
newnbrs<-NULL
for (i in 1:length(nbrs)){
newnbrs<-c(newnbrs,rep(nbrs[i],times=length(g[[nbrs[i]]])))
}
#work out repeated neighbours using g...
newnbrs
p<-AdaptNeighmp(order(X),X,coefflist,coeff,nbrs,newnbrs,31,TRUE,2,"ave",g)
nbrs<-p$newinfo[[3]]
nbrs
newnbrs<-NULL
for (i in 1:length(nbrs)){
newnbrs<-c(newnbrs,rep(nbrs[i],times=length(g[[nbrs[i]]])))
}
newnbrs
coefflist[[31]]<-p$results[[6]][31]
u<-PointsUpdatemp(X,coefflist,p$newinfo[[2]],newnbrs,p$newinfo[[3]],31,
order(X),p$results[[4]],lengths)
#
#and here is the updated coefficient list...
u$coeff
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.