thselect

Threshold selection for denoising

Syntax

THR = thselect(X,TPTR)

Description

example

THR = thselect(X,TPTR) returns the threshold value adapted to the 1-D signal X using the selection rule specified by TPTR. Available selection rules are:

  • 'rigrsure' — Adaptive threshold selection using the principle of Stein's Unbiased Risk Estimate (SURE).

  • 'sqtwolog' — Fixed-form threshold is sqrt(2*log(length(X))).

  • 'heursure' — Heuristic variant of 'rigrsure' and 'sqtwolog'.

  • 'minimaxi' — Minimax thresholding.

Examples

collapse all

Generate a Gaussian white noise signal. For reproducibility, set the random seed to the default value.

rng default
x = randn(1,1000);

Find the threshold for each selection rule.

thrRig = thselect(x,'rigrsure');
disp(['SURE (''rigrsure'') threshold: ',num2str(thrRig)]);
SURE ('rigrsure') threshold: 2.0518
thrSqt = thselect(x,'sqtwolog');
disp(['Universal (''sqtwolog'') threshold: ',num2str(thrSqt)]);
Universal ('sqtwolog') threshold: 3.7169
thrHeu = thselect(x,'heursure');
disp(['Heuristic variant (''heursure'') threshold: ',num2str(thrHeu)]);
Heuristic variant ('heursure') threshold: 3.7169
thrMin = thselect(x,'minimaxi');
disp(['Minimax (''minimaxi'') threshold: ',num2str(thrMin)]);
Minimax ('minimaxi') threshold: 2.2163

Minimax and SURE threshold selection rules are more conservative and would be more convenient when small details of the signal lie near the noise range.

Input Arguments

collapse all

Input data, specified as a real-valued vector.

Data Types: double

Threshold selection rule, specified:

  • 'rigrsure' — A threshold selection rule based on SURE (a quadratic loss function) for the soft threshold estimator. Starting with an estimate of risk for a particular threshold value, t, the algorithm minimizes the risks in t to yield a threshold value.

  • 'heursure' — A mixture of 'rigrsure' and 'sqtwolog'. If the signal-to-noise ratio is small, the SURE estimate is noisy. In that case, the fixed-form threshold is used.

  • 'sqtwolog' — A fixed-form (universal) threshold yielding minimax performance multiplied by a small factor proportional to log(length(X)).

  • 'minimaxi' — A fixed threshold chosen to yield minimax performance for mean square error against an ideal procedure. The minimax principle is used in statistics to design estimators. The denoised signal can be assimilated to the estimator of the unknown regression function. Therefore, the minimax estimator realizes the minimum of the maximum mean square error obtained for the worst function in a given set.

Threshold selection rules are based on the underlying model y = f(t) + e, where e is an N(0,1) white noise. Use level-dependent noise estimates for unscaled or nonwhite noise. (See NoiseEstimate parameter in wdenoise for more information.)

Output Arguments

collapse all

Threshold value adapted to X, returned as a positive real number.

References

[1] Donoho, D. L. “Progress in Wavelet Analysis and WVD: A Ten Minute Tour.” Progress in Wavelet Analysis and Applications (Y. Meyer, and S. Roques, eds.). Gif-sur-Yvette: Editions Frontières, 1993.

[2] Donoho, D. L., and Johnstone, I. M. “Ideal Spatial Adaptation by Wavelet Shrinkage.” Biometrika, Vol. 81, pp. 425–455, 1994.

[3] Donoho, D. L. “De-noising by Soft-Thresholding.” IEEE Transactions on Information Theory, Vol. 42, Number 3, pp. 613–627, 1995.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

Functions

Apps

Introduced before R2006a