ts_fil_wavelet: Wavelet Filter

View source: R/ts_fil_wavelet.R

ts_fil_waveletR Documentation

Wavelet Filter

Description

Denoise a series using discrete wavelet transforms and selected wavelet families.

Usage

ts_fil_wavelet(filter = "haar")

Arguments

filter

Available wavelet filters: 'haar', 'd4', 'la8', 'bl14', 'c6'.

Value

A ts_fil_wavelet object.

References

  • S. Mallat (1989). A Theory for Multiresolution Signal Decomposition: The Wavelet Representation. IEEE Transactions on Pattern Analysis and Machine Intelligence.

Examples

# Denoising with discrete wavelets (optionally selecting best filter)
# Load package and example data
library(daltoolbox)
data(tsd)
tsd$y[9] <- 2 * tsd$y[9]  # inject an outlier

# Fit wavelet filter ("haar" by default; can pass a list to select best)
filter <- ts_fil_wavelet()
filter <- fit(filter, tsd$y)
y <- transform(filter, tsd$y)

# Compare original vs wavelet-denoised series
plot_ts_pred(y = tsd$y, yadj = y)

tspredit documentation built on Feb. 11, 2026, 9:08 a.m.