WaveletThreshold
✖
WaveletThreshold
thresholds the detail wavelet coefficients in the DiscreteWaveletData object dwd.
thresholds the coefficients using the thresholding specification tspec.
thresholds the wavelet coefficients given by the wavelet indices wind.
Details



- WaveletThreshold[dwd] is effectively WaveletThreshold[dwd,"Universal"].
- WaveletThreshold[dwd,tspec,wind] indicates which wavelet coefficients to threshold, using the same index convention as described for DiscreteWaveletData.
- By default, thresholding is performed on detail coefficients at each refinement level.
- The threshold specification tspec can be of the form: tfun, {tfun,pars}.
- Possible tfun names and options include:
-
{"Hard",δ} {"Soft",δ} {"Firm",δ,r,p} {"PiecewiseGarrote",δ} {"SmoothGarrote",δ,n} {"Hyperbola", }
{"LargestCoefficients",k} keep the largest k coefficients - In all cases
is assumed to be a positive number or a thresholding function tfunc to compute
. Each tfunc[coefi,windi] should return a positive number.
- The parameter conditions for "Firm" are that
is a positive real and
a positive real number between 0 and 1.
- The parameter conditions for "SmoothGarrotte" are to have
be a positive real number.
- The threshold
can be automatically computed using the following methods:
-
Automatic "Universal" thresholding value {"FDR",α} false discovery rate at significance level α "GCV" minimizes generalized cross-validation function "GCVLevel" "GCV" performed at each level "SURE" Stein's unbiased risk estimate "SUREHybrid" combination of "SURE" and "Universal" thresholding "SURELevel" "SURE" performed at each level "Universal" Donoho and Johnstone's universal threshold "UniversalLevel" "Universal" performed at each level - The parameter conditions for {"FDR",α} are that α should be a number between 0 and 1. By default "FDR" is equivalent to {"FDR",0.05}.
- The following short tspec forms can be used:
-
"FDR" {"Soft",{"FDR",0.05}} "GCV" {"Soft","GCV"} "GCVLevel" {"Soft","GCVLevel"} "SURE" {"Hard","SURE"} "SURELevel" {"Hard","SURELevel"} "SUREShrink" {"Soft","SURE"} "Universal" {"Hard","Universal"} "UniversalLevel" {"Hard","UniversalLevel"} "VisuShrink" {"Soft","Universal"} "VisuShrinkLevel" {"Soft","UniversalLevel"}
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
DiscreteWaveletTransform of noisy data:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-w0fnh3

https://wolfram.com/xid/0czgd91pbxobj4mdftt-bzqe3o
Smooth data by thresholding wavelet coefficients:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-f02sf3

Compare original and smoothed data:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-jhuwce

Remove noise from a color image:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-bd3uf9

https://wolfram.com/xid/0czgd91pbxobj4mdftt-j9k0j
Threshold wavelet coefficients:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-grvx90

Synthesize smoothed image using InverseWaveletTransform and compare with original:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-hcy1ib

Scope (12)Survey of the scope of standard use cases
Basic Uses (4)
WaveletThreshold operates on a DiscreteWaveletData object:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-xrsf3p

The result is a new DiscreteWaveletData object representing thresholded coefficients:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-3ahw5t


https://wolfram.com/xid/0czgd91pbxobj4mdftt-7how9l

https://wolfram.com/xid/0czgd91pbxobj4mdftt-cmnvr4
Use specific threshold function:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ct41i1

Also specify how to choose threshold value:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ceovvo

Inverse transform and compare:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-enlmqf

Visualize the effect on wavelet coefficients:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-jcu9ah

https://wolfram.com/xid/0czgd91pbxobj4mdftt-y3nwhb
Compare using WaveletListPlot:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-r2wy0i

Perform thresholding on specific wavelet indexes:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-s46dsc

https://wolfram.com/xid/0czgd91pbxobj4mdftt-igodr4

https://wolfram.com/xid/0czgd91pbxobj4mdftt-yfii8u

By default only the detail coefficients are thresholded:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-q4qwq0

Use Automatic to threshold coefficients used in the inverse transform:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-hzw498

Use All to threshold all coefficients:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-w3gvdl

Use {wind1,wind2,…} to fully control which coefficients to threshold:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-dmhkmg

Compare the resulting coefficients:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-6840w

https://wolfram.com/xid/0czgd91pbxobj4mdftt-fl014z

Thresholding Methods (8)
Smooth noisy data using automatic thresholding methods:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-bpi9e8

https://wolfram.com/xid/0czgd91pbxobj4mdftt-h2rizg

Compare all named automatic thresholding methods tspec:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-0l6x

https://wolfram.com/xid/0czgd91pbxobj4mdftt-iop2rl

Choose specific thresholding function tfun to apply:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-hohtol

https://wolfram.com/xid/0czgd91pbxobj4mdftt-19nyc

Reconstruct data from thresholded coefficients with automatically chosen threshold value:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-mut9yr

https://wolfram.com/xid/0czgd91pbxobj4mdftt-bjnler

Use a named method to automatically compute the threshold value :

https://wolfram.com/xid/0czgd91pbxobj4mdftt-d00yxt

https://wolfram.com/xid/0czgd91pbxobj4mdftt-izbyh1

Reconstruct data after "Soft" thresholding with various threshold value selection methods:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-bpg9i9

https://wolfram.com/xid/0czgd91pbxobj4mdftt-k5xodb

Use a specific numerical threshold value :

https://wolfram.com/xid/0czgd91pbxobj4mdftt-fv615l

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ddgtet

The best smoothing occurs for threshold values that are similar to the scale of the noise:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-b1qmbp

https://wolfram.com/xid/0czgd91pbxobj4mdftt-b2wsze

Use a function to compute a threshold value :

https://wolfram.com/xid/0czgd91pbxobj4mdftt-d842lq

https://wolfram.com/xid/0czgd91pbxobj4mdftt-5a5cvf
Threshold all coefficients below the standard deviation:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-n21ow6

https://wolfram.com/xid/0czgd91pbxobj4mdftt-saa5wa


https://wolfram.com/xid/0czgd91pbxobj4mdftt-d3m7na

Plot the effect of thresholding function tfun on coefficient values ranging from -0.5 to 0.5:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-f6qbvx

https://wolfram.com/xid/0czgd91pbxobj4mdftt-equ6ad

Apply thresholding separately at each refinement level to data varying on different scales:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-f176u

https://wolfram.com/xid/0czgd91pbxobj4mdftt-bsvqix

Different methods for selecting separate threshold values at each level:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-epondo


https://wolfram.com/xid/0czgd91pbxobj4mdftt-g0fcgl

Compare with methods that choose one threshold value for all levels:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-mkkuv

Perform thesholding by specifying a function and wavelet index to compute :

https://wolfram.com/xid/0czgd91pbxobj4mdftt-4jn6by

https://wolfram.com/xid/0czgd91pbxobj4mdftt-kvlv76
Threshold all detail coefficients below the standard deviation:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-icuifp

https://wolfram.com/xid/0czgd91pbxobj4mdftt-wvmrp4

https://wolfram.com/xid/0czgd91pbxobj4mdftt-yj66hn


https://wolfram.com/xid/0czgd91pbxobj4mdftt-15dxf3

Generalizations & Extensions (1)Generalized and extended use cases
Use FindThreshold to compute thresholding values:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-1mc047

https://wolfram.com/xid/0czgd91pbxobj4mdftt-8uc0qw

Specifying a thresholding function computes level-dependent thresholding values:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-eyx2jo

https://wolfram.com/xid/0czgd91pbxobj4mdftt-izh57f


https://wolfram.com/xid/0czgd91pbxobj4mdftt-qyao8o

Applications (8)Sample problems that can be solved with this function
Automatic Denoising (2)
Data processing pipeline for simple automatic smoothing:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-9i7uw

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ccnstw

https://wolfram.com/xid/0czgd91pbxobj4mdftt-nsgq53


https://wolfram.com/xid/0czgd91pbxobj4mdftt-r1ww2

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ct8xb4

Add normally distributed noise with standard deviation σ:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-bre6q1

https://wolfram.com/xid/0czgd91pbxobj4mdftt-dnp61p

Compare effectiveness of automatic smoothing for different noise levels:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-2tw6w

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ha9ok6

Image Effects (1)
Threshold specific components of an image:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-hknkyt

Strongly threshold horizontal and vertical detail coefficients {___,1 2} only:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-58r9rs


https://wolfram.com/xid/0czgd91pbxobj4mdftt-x4lii

The inverse transform image has mainly diagonal features:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-dwfxtu

Benchmarking Thresholding Methods (2)
Plot the noise subtracted by different thresholding functions tfun with automatic threshold value:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-1eg3h

https://wolfram.com/xid/0czgd91pbxobj4mdftt-eq94ky

Subtract smoothed data from original data (giving a noise model):

https://wolfram.com/xid/0czgd91pbxobj4mdftt-fkd5ar

https://wolfram.com/xid/0czgd91pbxobj4mdftt-jepn7s

Compare performance of automatic thresholding methods when smoothing noisy data:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-f79ohg

https://wolfram.com/xid/0czgd91pbxobj4mdftt-c0vl3w

https://wolfram.com/xid/0czgd91pbxobj4mdftt-9up1h

Quantify performance using SNR (signal-to-noise ratio) and peak SNR in decibels (dB):

https://wolfram.com/xid/0czgd91pbxobj4mdftt-1gcqb3

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ygup1b
Smooth by applying thresholding method th to detail coefficients {___,1}:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-brmio4

https://wolfram.com/xid/0czgd91pbxobj4mdftt-copvbg
Compare all named automatic thresholding methods; higher value is better:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-vy4ok2

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ky0kq

Plot smoothed data together with perfectly noise-free data:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-jsqokc

Computing Thresholding Values (3)
"Universal" thresholding value:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-jdy2l6

https://wolfram.com/xid/0czgd91pbxobj4mdftt-l26piu

https://wolfram.com/xid/0czgd91pbxobj4mdftt-fz5dkj

Perform a LiftingWaveletTransform:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-n220u
The mean absolute deviation is computed using detail coefficients at first refinement level {1}:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-fcvc2q
Compute universal threshold value as
and perform a "Hard" threshold:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ptygb

https://wolfram.com/xid/0czgd91pbxobj4mdftt-hb1mbr
Use WaveletThreshold to compute the "Universal" threshold value:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-g5t4sm

https://wolfram.com/xid/0czgd91pbxobj4mdftt-cueesp


https://wolfram.com/xid/0czgd91pbxobj4mdftt-fg6zsv


https://wolfram.com/xid/0czgd91pbxobj4mdftt-g1vae0


https://wolfram.com/xid/0czgd91pbxobj4mdftt-jbfxmy

https://wolfram.com/xid/0czgd91pbxobj4mdftt-rsd2l

https://wolfram.com/xid/0czgd91pbxobj4mdftt-b6nrwk

Perform a LiftingWaveletTransform:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ckjmz5
Compute "SURE" threshold values :

https://wolfram.com/xid/0czgd91pbxobj4mdftt-i0c64f

https://wolfram.com/xid/0czgd91pbxobj4mdftt-edhahl

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ldhufj
Use WaveletThreshold to compute "SURE" threshold value:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-b2pkrh

https://wolfram.com/xid/0czgd91pbxobj4mdftt-cyn6l


https://wolfram.com/xid/0czgd91pbxobj4mdftt-fhx3cv


https://wolfram.com/xid/0czgd91pbxobj4mdftt-grqpuy


https://wolfram.com/xid/0czgd91pbxobj4mdftt-vjk1l

https://wolfram.com/xid/0czgd91pbxobj4mdftt-bugmg0

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ew3631

Perform a LiftingWaveletTransform:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-kpqu8g

https://wolfram.com/xid/0czgd91pbxobj4mdftt-b10lec

For each wavelet coefficient , find its two-sided
-value
:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-cgg77v

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ddlt4j
Order the according to their size
. Find
, where
is the significance level:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-o4e287

https://wolfram.com/xid/0czgd91pbxobj4mdftt-l52s6s

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ew15u

https://wolfram.com/xid/0czgd91pbxobj4mdftt-dpnohe


https://wolfram.com/xid/0czgd91pbxobj4mdftt-26iub
Use WaveletThreshold to compute "FDR" threshold value:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-bhsm7q

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ldtti4


https://wolfram.com/xid/0czgd91pbxobj4mdftt-bd0nad


https://wolfram.com/xid/0czgd91pbxobj4mdftt-ikcs0c

Properties & Relations (9)Properties of the function, and connections to other functions
Thresholding functions approach Identity for small threshold values :

https://wolfram.com/xid/0czgd91pbxobj4mdftt-rjgky

https://wolfram.com/xid/0czgd91pbxobj4mdftt-eaax6a

"Hard" thresholding is similar to Chop:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-7i174h
Data values with absolute value below threshold are set to 0:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-8wx08u

"Soft" thresholding performs a shrinking operation:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-3mnnit
Data values below a certain threshold are set to 0; those above
are "shrunk" by
:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-8s6hem


https://wolfram.com/xid/0czgd91pbxobj4mdftt-8hw91g
Parameter (
) controls the range over which firm thresholding interpolates between 0 and Identity. Parameter
(
) controls where
lies between
and
, with
by default:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-0cski4

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ja4wpq

https://wolfram.com/xid/0czgd91pbxobj4mdftt-gl9i6v


https://wolfram.com/xid/0czgd91pbxobj4mdftt-zk3j8y


https://wolfram.com/xid/0czgd91pbxobj4mdftt-9bifs6

"Firm" thresholding is a compromise between "Hard" and "Soft" thresholding:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-1esatp
"Firm" thresholding has uniformly smaller variance than "Hard" thresholding:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-gjyepf

In the limit , "Firm" threshold performs "Soft" thresholding:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-nvqbl

In the limit , "Firm" threshold performs "Hard" thresholding:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-ri3fk8

"PiecewiseGarrote" thresholding:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-e3b0s8
This is similar to "Firm" thresholding with the advantage of having a single parameter :

https://wolfram.com/xid/0czgd91pbxobj4mdftt-qnbypn


https://wolfram.com/xid/0czgd91pbxobj4mdftt-53hdc6
In the limit , "SmoothGarotte" goes to "Hard" thresholding:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-63bz5


https://wolfram.com/xid/0czgd91pbxobj4mdftt-gbj430

https://wolfram.com/xid/0czgd91pbxobj4mdftt-etx9wc

Use WaveletMapIndexed to perform "Hard" thresholding:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-rb3jwv

https://wolfram.com/xid/0czgd91pbxobj4mdftt-00qqd9

Possible Issues (3)Common pitfalls and unexpected behavior
Using "Hard" thresholding function with "GCV" thresholding value:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-05fpav

https://wolfram.com/xid/0czgd91pbxobj4mdftt-q9u9dq

Noise coefficients may pass through "Hard" thresholding:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-vphgx3

https://wolfram.com/xid/0czgd91pbxobj4mdftt-mgv3ge

"Soft" thresholding function shrinks these spurious peaks:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-cyyz08

https://wolfram.com/xid/0czgd91pbxobj4mdftt-9jm5ae

The noise estimate is computed based on first-level detail coefficients:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-gxda0w

A warning is generated if the estimated noise level is 0:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-1weipp



https://wolfram.com/xid/0czgd91pbxobj4mdftt-lkl18d

WaveletThreshold does not operate on non-numeric wavelet coefficients:

https://wolfram.com/xid/0czgd91pbxobj4mdftt-9b0m3


https://wolfram.com/xid/0czgd91pbxobj4mdftt-bm5e27


Wolfram Research (2010), WaveletThreshold, Wolfram Language function, https://reference.wolfram.com/language/ref/WaveletThreshold.html.
Text
Wolfram Research (2010), WaveletThreshold, Wolfram Language function, https://reference.wolfram.com/language/ref/WaveletThreshold.html.
Wolfram Research (2010), WaveletThreshold, Wolfram Language function, https://reference.wolfram.com/language/ref/WaveletThreshold.html.
CMS
Wolfram Language. 2010. "WaveletThreshold." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WaveletThreshold.html.
Wolfram Language. 2010. "WaveletThreshold." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WaveletThreshold.html.
APA
Wolfram Language. (2010). WaveletThreshold. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WaveletThreshold.html
Wolfram Language. (2010). WaveletThreshold. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WaveletThreshold.html
BibTeX
@misc{reference.wolfram_2025_waveletthreshold, author="Wolfram Research", title="{WaveletThreshold}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/WaveletThreshold.html}", note=[Accessed: 24-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_waveletthreshold, organization={Wolfram Research}, title={WaveletThreshold}, year={2010}, url={https://reference.wolfram.com/language/ref/WaveletThreshold.html}, note=[Accessed: 24-April-2025
]}