invtnpmp(X, coefflist, coeff, lengths, lengthsremove, pointsin, removelist,
neighbrs, newneighbrs, schemehist, interhist, nadd = length(X) - 2,
intercept = TRUE, neighbours = 1, closest = FALSE, LocalPredmp = LinearPredmp, mpdet)
length(X)-nkeep
) in the forward transform.LinearPredmp
, QuadPredmp
, CubicPredmp
, AdaptPredmp
and AdaptNeighmp
.intervals(X)
.order(X)
.Step Two. Using the information about the prediction scheme used in the "forward" transform, use the corresponding version of
Step Three. "Undo" the update step of the transform, and then the prediction step of the transform. The vector of scaling and detail coefficients, as well as the interval lengths are modified accordingly.
Step Four. Remove the added point from
Step Five. Return to step 1 but in the identification of the next point to add, the second to last entries in (the original)
The algorithm continues like this until as many points as desired are added.
AdaptNeighmp
, AdaptPredmp
, CubicPredmp
, fwtnpmp
, invtnp
, LinearPredmp
, QuadPredmp
,
UndoPointsUpdatemp
#read in multiple point data...
data(motorcycledata)
times<-motorcycledata$time
accel<-motorcycledata$accel
shortf<-adjustx(times,accel)$sepf
out<-fwtnpmp(times,accel,LocalPredmp=CubicPredmp,neighbours=2)
inv<-invtnpmp(times, out$coefflist, out$coeff, out$lengths, out$lengthsremove, out$pointsin,
out$removelist,out$neighbrs,out$newneighbrs,out$schemehist,out$interhist, neighbours = 2,
LocalPredmp = CubicPredmp)
sum(abs(shortf-inv$coeff))
Run the code above in your browser using DataLab