denoiseheteroprop: denoiseheteroprop

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Denoises the inputted signal using artificial levels noise variance estimation and bayesian thresholding, assuming noise variances known up to proportionality constants.

Usage

1
2
denoiseheteroprop(x, f, pred, neigh, int, clo, keep, 
rule = "median",gamvec,returnall=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.

rule

The type of bayesian thresholding used in the procedure. Possible values are "mean", "median" (posterior mean or median thresholding) or "hard or
"soft" (hard or soft thresholding).

gamvec

A vector of proportions of the noise standard deviations (in the order of x).

returnall

Indicates whether the function returns useful variables or just the denoised datapoints.

Details

The function uses the transform matrix to normalise the detail coefficients produced from the forward transform, so that they can be used in the bayesian thresholding procedure EbayesThresh. The normalising factors are calculated assuming that the noise associated to the ith gridpoint is γ_{i}σ. The coefficients are divided into artificial levels, and the first (largest)level is used to estimate the noise variance of the coefficients. EbayesThresh is then used to threshold the coefficients. The resulting new coefficients are then unnormalised and the transform inverted to obtain an estimate of the true (unnoisy) signal.

Value

If returnall=FALSE, the estimate of the function after denoising. If returnall=TRUE, a list with components:

fhat

the estimate of the function after denoising.

w

the matrix associated to the wavelet transform.

indsd

the individual coefficient variances introduced by the transform.

al

the artificial levels used to estimate the noise variance.

sd

the standard deviation of the noise.

Author(s)

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

See Also

denoise

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x1<-runif(256)
y1<-make.signal2("doppler",x=x1)
n1<-rnorm(256,0,.1)
z1<-y1+n1
gvec<-c(rep(.4,times=100),rep(.7,times=100),rep(.3,times=56))
#
est1<-denoiseheteroprop(x1,z1,AdaptNeigh,1,TRUE,TRUE,2,"median",gvec)
sum(abs(y1-est1))
#
#the error between the true signal and the denoised version. 

nunesmatt/adlift documentation built on May 15, 2019, 3:33 p.m.