betathresh: Apply Beta Threshold to Data

View source: R/betathresh.R

betathreshR Documentation

Apply Beta Threshold to Data

Description

betathresh performs a generalized thresholding operation on the data y. The thresholding operation is parameterized by the parameter beta.

Usage

betathresh(y, t, beta = 2)

Arguments

y

Numeric vector or matrix representing the noisy data.

t

Non-negative numeric value representing the threshold.

beta

Numeric value indicating the type of thresholding.

Details

The function offers flexibility by allowing for different types of thresholding based on the beta parameter. Soft thresholding, commonly used in wavelet-based denoising corresponds to beta=1 . James-Stein thresholding corresponds to beta=2. The implementation includes a small constant for numerical stability when computing the thresholding operation.

The thresholding operator is defined as:

\tau(x,t) = x \max \left( 1 - t^{\beta} |x|^{-\beta}, 0 \right)

with \beta \geq 1.

Value

x Numeric vector or matrix of the filtered result.

References

Donoho, D. L., & Johnstone, I. M. (1995). Adapting to unknown smoothness via wavelet shrinkage. Journal of the american statistical association, 90(432), 1200-1224.

de Loynes, B., Navarro, F., & Olivier, B. (2021). Data-driven thresholding in denoising with spectral graph wavelet transform. Journal of Computational and Applied Mathematics, 389, 113319.

Examples

# Define a 2x2 matrix
mat <- matrix(c(2, -3, 1.5, -0.5), 2, 2)

# Apply soft thresholding with a threshold of 1
betathresh(mat, 1, 1)

gasper documentation built on May 29, 2024, 8:32 a.m.