Learn R Programming

haarfisz (version 4.5.4)

hf.u: hf.u

Description

Denoises a Gaussian contaminated vector using wavelet thresholding with the universal threshold. Note: this function does not actually do any Haar-Fisz transform, it is a homogeneous variance Gaussian denoising function, which is used by the haarfisz package.

Usage

hf.u(x, filter.number = 10, family = "DaubLeAsymm", min.level = 3, type = "hard")

Value

Denoised version of x.

Arguments

x

The noisy vector, its length must be a power of 2.

filter.number

The filter number of the analysing wavelet. Can be set to 1, 2, ..., 10 for family == "DaubExPhase", or to 4, 5, ..., 10 for family == "DaubLeAsymm".

family

The family of wavelet bases from which the wavelet filter.number is chosen. Can be set to "DaubExPhase" or "DaubLeAsymm".

min.level

The minimum level thresholded.

type

Type of thresholding, can be set to hard or soft

Author

Piotr Fryzlewicz

Details

Uses threshold, wd and AvBasis

References

Fryzlewicz, P. and Nason, G.P. (2004) A Haar-Fisz algorithm for Poisson intensity estimation. Journal of Computational and Graphical Statistics, 13, 621-638. tools:::Rd_expr_doi("10.1198/106186004X2697")

See Also

threshold, wd, AvBasis

Examples

Run this code
#
# Generate simple sinusoidal test signal
#
test.sig <- sin(seq(from=0, to=6*pi, length=128))
#
# Invent simulated noisy signal
#
test.dat <- test.sig + rnorm(128, sd=0.2)
#
# Denoise using hf.bt
#
test.est <- hf.u(test.dat)
#
# Now plot the results: the truth, the noisy signal, the estimate
#
ts.plot(test.dat)
lines(test.est, col=2)
lines(test.sig, col=3, lty=2)

Run the code above in your browser using DataLab