Learn R Programming

nlt (version 2.2-1)

transmatdualperm: transmatdualperm

Description

Works out the transform matrix for a particular prediction scheme and neighbourhood structure.

Usage

transmatdualperm(x, f, Pred = AdaptNeigh, neigh = 1, int = TRUE, clo = 
TRUE, keep = 2,perm = 
sample(1:length(x),(length(x)-keep),FALSE),varonly=FALSE)

Arguments

x

A vector of grid values. Can be of any length, not necessarily equally spaced.

f

A vector of function values corresponding to x. Must be of the same length as x.

Pred

The type of regression to be performed. Possible options are LinearPred, QuadPred, CubicPred, AdaptPred and AdaptNeigh.

neigh

The number of neighbours over which the regression is performed at each step. If clo is false, then this in fact denotes the number of neighbours on each side of the removed point.

int

Indicates whether or not the regression curve includes an intercept.

clo

Refers to the configuration of the chosen neighbours. If clo is false, the neighbours will be chosen symmetrically around the removed point. Otherwise, the closest neighbours will be chosen.

keep

The number of scaling coefficients to be kept in the final representation of the initial signal. This must be at least two.

perm

Vector of length (length(x)-keep). It gives the trajectory for the modified lifting algorithm to follow, i.e. it gives the order of point removal.

varonly

A boolean variable indicating whether only the coefficient variances should be returned, i.e. just the diagonal of the transform matrix Wnew.

Value

out

the output from the forward transform.

Wnew

the matrix associated to the wavelet transform.

x

the original gridpoint vector.

Details

The function uses Amatdual to form the refinement matrices \(A_j\), from which the augmented matrices \(T_j\) are constructed. This process is iterated, to find the transform matrix (the top level augmented matrix). The rows and columns of this matrix are then reordered to be in the order of out$coeff, i.e. so that the columns correspond to \(f_1 \dots f_n\).

See Also

fwtnp

Examples

Run this code
# NOT RUN {
x1<-runif(10)
y1<-make.signal2("doppler",x=x1)
#
vec<-sample(1:10,8,FALSE)

a<-transmatdualperm(x1,y1,AdaptNeigh,2,TRUE,TRUE,2,perm=vec)
#
a$Wnew
#
#the transform matrix for this adaptive lifting scheme 

# }

Run the code above in your browser using DataLab