smooth_wavelet: Wavelet Denoising

smooth_waveletR Documentation

Wavelet Denoising

Description

The basic idea behind smooth_wavelet is to denoise a vector of data using wavelet methods that are available in 3 R packages: wmtsa, EbayesThresh and wavethresh. Do not mix parameters related to different methods.

Usage

smooth_wavelet(x, thfun = wavShrink, wtfun = NULL, wtfunlist = list(), ...)

Arguments

x

A numeric vector. If the data is not of length 2 ^ J for some integer J, the function WiSEBoot::padVector increases the length of data to achieve the particular length requirement based on reflection type. See the help page of the mentioned function for details. After the signal computation, the length is again adjusted for the orginal length of x.

thfun

A function to denoise x. This should be a method available in packages wmtsa, EbayesThresh and wavethresh. The options are wavShrink,
ebayesthresh.wavelet and threshold. Default: wavShrink.

wtfun

A wavelet transform function: dwt or modwt if thfun = ebayesthresh.wavelet. wd if thfun = threshold. If thfun = wavShrink, wtfun = NULL (default).

wtfunlist

A named list of parameters to pass to functions dwt, modwt or wd.

...

Additional arguments to pass to functions:

  • wmtsa::wavShrink

  • EbayesThresh::ebayesthresh.wavelet

  • wavethresh::threshold

Value

A numeric vector with the wavelet-based signal estimation.

See Also

wavShrink, ebayesthresh.wavelet, threshold

Examples

inf_head <- coreinf_br[["ipca"]]

# From package wmtsa (default):
smooth_wavelet(inf_head)

# From package EbayesThresh:
smooth_wavelet(inf_head, ebayesthresh.wavelet, modwt, list(wf = "haar"),
               a = NA, vscale = "independent")

# From package wavethresh:
smooth_wavelet(inf_head, threshold, wd, list(filter.number = 8), policy = "cv")



nelson16silva/wavcoreinf documentation built on Feb. 17, 2025, 7:10 p.m.