Main Content

wdcbm

Thresholds for wavelet 1-D using Birgé-Massart strategy

    Description

    [thr,nkeep] = wdcbm(C,L,alpha,M) returns level-dependent thresholds thr and numbers of coefficients to be kept nkeep, for denoising or compressing a signal. wdcbm uses a wavelet coefficients selection rule based on the Birgé-Massart strategy to obtain the thresholds.

    [C,L] is the wavelet decomposition structure of the signal to be denoised or compressed, at level N = length(L)-2. alpha and M are real numbers greater than 1.

    wdcbm(C,L,alpha) is equivalent to wdcbm(C,L,alpha,L(1)).

    example

    Examples

    collapse all

    Load the electrical signal. Select a portion of the signal.

    load leleccum
    indx = 2600:3100;
    x = leleccum(indx);

    Obtain the wavelet decomposition of the signal at level 5 using the db3 wavelet.

    wname = "db3";
    lev = 5;
    [c,l] = wavedec(x,lev,wname);

    Use wdcbm to select level-dependent thresholds for signal compression. Use the suggested parameters.

    alpha = 1.5;
    m = l(1);
    [thr,nkeep] = wdcbm(c,l,alpha,m)
    thr = 1×5
    
       19.5569   17.1415   20.2599   42.8959   15.0049
    
    
    nkeep = 1×5
    
         1     2     3     4     7
    
    

    Use wdencmp for compressing the signal using the thresholds. Use hard thresholding.

    [xd,cxd,lxd,perf0,perfl2] = wdencmp("lvd",c,l,wname,lev,thr,"h");

    Plot the original and compressed signals.

    subplot(2,1,1)
    plot(indx,x)
    title("Original Signal")
    subplot(2,1,2)
    plot(indx,xd)
    title("Compressed Signal")
    xlab1 = ['2-norm rec.: ',num2str(perfl2)];
    xlab2 = [' %  -- zero cfs: ',num2str(perf0), ' %'];
    xlabel([xlab1 xlab2])

    Figure contains 2 axes objects. Axes object 1 with title Original Signal contains an object of type line. Axes object 2 with title Compressed Signal, xlabel 2-norm rec.: 99.9549 % -- zero cfs: 92.9524 % contains an object of type line.

    Input Arguments

    collapse all

    Wavelet decomposition of the signal to be denoised or compressed, specified as a vector. The vector contains the wavelet coefficients. The bookkeeping vector L contains the number of coefficients by level. See wavedec.

    Data Types: double

    Bookkeeping vector, specified as a vector of positive integers. The bookkeeping vector is used to parse the coefficients in the wavelet decomposition C by level. See wavedec.

    Data Types: double

    Sparsity parameter to use in the Birgé-Massart strategy, specified as a real-valued scalar greater than 1. Typically, alpha = 1.5 for compression and alpha = 3 for denoising. For more information, see Wavelet Coefficients Selection.

    Data Types: double

    Factor to use in the Birgé-Massart strategy, specified as a real-valued scalar greater than 1. The default value is L(1), the number of the coarsest approximation coefficients. Recommended values for M are from L(1) to 2*L(1). For more information, see Wavelet Coefficients Selection.

    Data Types: double

    Output Arguments

    collapse all

    Level-dependent thresholds, returned as a vector of length N, where N = length(L)-2. thr(i) contains the threshold for level i. The thresholds are obtained using a wavelet coefficients selection rule based on the Birgé-Massart strategy. For more information, see Wavelet Coefficients Selection.

    Number of coefficients to be kept at each level, returned as a vector of length N, where N = length(L)-2. nkeep(i) contains the number of coefficients to be kept for level i.

    Data Types: double

    More About

    collapse all

    Wavelet Coefficients Selection

    Thresholds are obtained using a wavelet coefficients selection rule based on the Birgé-Massart strategy. The values N=length(L)-2, M and alpha define the strategy.

    • At level N+1 (and coarser levels), everything is kept.

    • For level i from 1 to N, the ni largest coefficients are kept, where ni = M / (N+2-i)alpha.

    The default value of M = L(1) corresponds to the formula nN+1 = M / (N+2-(N+1))alpha = M.

    References

    [1] Birgé, Lucien, and Pascal Massart. “From Model Selection to Adaptive Estimation.” In Festschrift for Lucien Le Cam: Research Papers in Probability and Statistics, edited by David Pollard, Erik Torgersen, and Grace L. Yang, 55–87. New York, NY: Springer, 1997. https://doi.org/10.1007/978-1-4612-1880-7_4.

    Version History

    Introduced before R2006a