nlt {nlt} | R Documentation |
Denoise a signal using a nondecimated lifting transform
Description
Starting with a noise-contaminated signal, we decompose it using a 'nondecimated' lifting algorithm (i.e. by applying the modified lifting transform following several random paths), shrink all the obtained detail coefficients and invert each transform to give an estimated signal. The average of all these estimates is the final proposal for estimating the true (unknown) signal.
Usage
nlt(x, f, J, Pred = AdaptPred, neighbours = 1, closest = FALSE, intercept = TRUE,
nkeep = 2, trule = "median",verbose = TRUE,do.orig = FALSE, returnall = FALSE)
Arguments
x |
Vector of any length (possibly irregularly spaced) that gives the grid locations where the signal is observed. |
f |
Vector of the same length as |
J |
Number of trajectories to be used by the nondecimated lifting algorithm. |
Pred |
The type of regression to be used in the prediction step of the modified lifting algorithm. Choices are linear, quadratic or cubic (respectively, |
neighbours |
Number of neighbours to be used for defining the neighbourhood of each point that has to be removed. If ( |
closest |
If ( |
intercept |
Specifies whether ( |
nkeep |
Number of scaling points we want at the end of the application of the transform. The usual choice is |
trule |
The type of Bayesian shrinkage technique, with possible choices posterior median ( |
verbose |
A boolean indicating whether extra information should be printed. |
do.orig |
A boolean indicating whether the original |
returnall |
A boolean indicating whether the function returns useful variables or just the denoised datapoints. |
Details
Essentially, this function applies J
times the modified lifting algorithm (that can be found in fwtnpperm
), and removes the noise from all sets of detail coefficients by using empirical Bayes shrinkage (of package 'EbayesThresh'). Inverting (by means of the function invtnp
of the package 'adlift') each transform consequently results in J
estimates of the (unknown) true signal. The average of these estimators is our proposed estimator. The functions that appear as choices for Pred
can be found in the package 'adlift'.
Value
vec |
Matrix whose rows give the trajectories to be used by the nondecimated lifting algorithm. |
ghatnat |
Vector that gives the estimated true signal given by denoising using the lifting scheme that establishes its own order for removing the points (but with the same specification for prediction stage and neighbourhood as the modified algorithm), rather than a randomly generated order. |
aveghat |
Estimated signal, obtained as the average of the individual estimates from the random trajectory runs. |
Note
Use this function together with the "adlift" and "EbayesThresh" packages available from CRAN.
Author(s)
Marina Knight (marina.knight@bristol.ac.uk)
References
See the paper 'A "nondecimated" lifting transform.' by Knight, M.I. and Nason, G.P. (2009) for further details.
See Also
denoiseperm
, fwtnpperm
, fwtnpperm
, and also invtnp
of package 'adlift'
Examples
# construct the grid
x<-runif(256)
# construct the true, normally unknown, signal
g<-make.signal2("blocks",x=x)
# generate noise with mean 0 and signal-to-noise ratio 5
noise<-rnorm(256,mean=0,sd=sqrt(var(g))/5)
# generate a noisy version of g
f<-g+noise
# decide on a number of random trajectories to be used (below J=100, in paper J=20,30), and apply
# the nondecimated lifting transform to the noisy signal (x,f)
#
# below we apply the modified lifting transform J times, each time following a different path,
# and using adaptive prediction with neighbourhoods of size 2 in closest configuration;
# all details are then thresholded using posterior medians and the algorithms inverted
# the aggregate estimator of g proposed by our method is found in out$aveghat
out<-nlt(x,f,J=10,Pred=AdaptPred,neighbours=2,closest=TRUE,intercept=TRUE,nkeep=2,trule="median")