hard.thresh: Hard thresholding of a top-down Unbalanced Haar decomposition

View source: R/hard.thresh.R

hard.threshR Documentation

Hard thresholding of a top-down Unbalanced Haar decomposition

Description

Presented with an object returned by best.unbal.haar, the function sets to zero those Unbalanced Haar coefficients which fall below a certain threshold sigma.

Usage

hard.thresh(buh, sigma = 1)

Arguments

buh

an object returned by best.unbal.haar containing the decomposition to be thresholded

sigma

the threshold (a positive scalar)

Value

a thresholded object, of the same class as buh

Author(s)

Piotr Fryzlewicz

See Also

best.unbal.haar, hard.thresh.bu

Examples

x <- rnorm(1000)
x.uh <- best.unbal.haar(x)
x.uh.th <- hard.thresh(x.uh)
x.uh.th.r <- reconstr(x.uh.th)
ts.plot(x.uh.th.r)

unbalhaar documentation built on April 19, 2022, 5:05 p.m.