R: invtnpmp

invtnpmp {adlift} | R Documentation

## invtnpmp

### Description

Performs the inverse lifting transform on a detail and scaling coefficient vector with grid X and corresponding coefficients coeff, based on multiple point information.

### Usage

    invtnpmp(X, coefflist, coeff, lengths, lengthsremove, pointsin, removelist,
     neighbrs, newneighbrs, schemehist, interhist, nadd = length(X) - 2,
     intercept = TRUE, neighbours = 1, closest = FALSE, LocalPred = LinearPredmp, mpdet)

### Arguments

`X` | data vector of the grid used in the transform.
`coefflist` | list of detail and multiple scaling coefficients.
`coeff` | vector of detail and scaling coefficients in the wavelet decomposition of the signal.
`lengths` | vector of interval lengths to be used in the update step of the transform. This is of length pointsin.
`lengthsremove` | vector of interval lengths corresponding to the points removed during the forward transform.
`pointsin` | indices into X of the scaling coefficients in the wavelet decomposition.
`removelist` | a vector of indices into X of the lifted coefficients during the transform (in the order of removal).
`neighbrs` | a list of indices into X. Each list entry gives the indices of the neighbours of the removed point used at that particular step of the forward transform.
`newneighbrs` | a list of indices into X. Each list entry gives the indices of the multiple neighbours of the removed point used at that particular step of the forward transform.
`schemehist` | a vector of character strings indicating the type of regression used at each step of the forward transform. This is NULL apart from when AdaptNeigh is to be used in the transform.
`interhist` | a boolean vector indicating whether or not an intercept was used in the regression curve at each step of the forward transform. This is NULL apart from when AdaptNeigh is to be used in the transform.
`nadd` | The number of steps to perform of the inverse transform. This corresponds to (`length(X)-nkeep`) in the forward transform.
`intercept` | Boolean value for whether or not an intercept is used in the prediction step of the transform.
`neighbours` | the number of neighbours in the computation of the predicted value.
`closest` | a boolean value showing whether or not the neighbours were symmetrical (FALSE) about the removed point during the transform.
`LocalPred` | The type of regression to be performed. Possible options are `LinearPredmp`, `QuadPredmp`, `CubicPredmp`, `AdaptPredmp` and `AdaptNeighmp`.
`mpdet` | how the mutiple point detail coefficients are computed. Possible values are "ave", in which the multiple detail coefficients produced when performing the multiple predictions are averaged, or "min", where the overall minimum detail coefficient is taken.

### Details

This algorithm reconstructs an estimate of a function/signal from information about detail and scaling coefficients in its wavelet decomposition, using the multiple point structure information to estimate the spread of original points. Step One. Extract information about the first point to be added in the transform from the last entries in removelist, lengthsremove and neighbrs. Use this information to discover the correct placement of this point in relation to the indices in pointsin.

Step Two. Using the information about the prediction scheme used in the "forward" transform, use the corresponding version of LocalPred to obtain prediction weights and value for the lifted point.

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 removelist. Update pointsin and lengths to contain the added point.

Step Five. Return to step 1 but in the identification of the next point to add, the second to last entries in (the original) removelist, lengthsremove and neighbrs are used to indentify the point and then place it in pointsin.

The algorithm continues like this until as many points as desired are added.

### Value

`X` | data vector of the grid used in the transform.
`coeff` | vector of signal function values after inversion.
`lengths` | vector of interval lengths at the start of the transform. This should be the same as `intervals(X)`.
`lengthsremove` | vector of interval lengths corresponding to the points added during the transform.
`pointsin` | indices into X of the scaling coefficients in the wavelet decomposition. These are the indices of the X values which remain after all points in removelist have been added. For a straight forward-inverse transform implementation, this should be `order(X)`.
`removelist` | a vector of indices into X of the lifted coefficients during the transform (in the reverse order of how they were added).

### Author(s)

Matt Nunes (nunesrpackages@gmail.com), Marina Knight

### See Also

`AdaptNeighmp`, `AdaptPredmp`, `CubicPredmp`, `fwtnpmp`, `invtnp`, `LinearPredmp`, `QuadPredmp`, `UndoPointsUpdatemp`

### Examples

    #read in multiple point data...

    data(motorcycledata)
    times<-motorcycledata$time
    accel<-motorcycledata$accel
    shortf<-adjustx(times,accel)$sepf

    out<-fwtnpmp(times,accel,LocalPred=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,
    LocalPred = CubicPredmp)

    sum(abs(shortf-inv$coeff))

[Package adlift version 1.4-1 Index]