Thresholds for wavelet 1-D using Birgé-Massart strategy
[THR,NKEEP] = wdcbm(C,L,ALPHA,M)
[THR,NKEEP] = wdcbm(C,L,ALPHA,M) returns
THR and numbers of coefficients
to be kept
NKEEP, for de-noising or compression.
obtained using a wavelet coefficients selection rule based on the
[C,L] is the wavelet decomposition structure
of the signal to be de-noised or compressed, at level
be real numbers greater than 1.
THR is a vector of length
the threshold for level i.
NKEEP is a vector of length
the number of coefficients to be kept at level i.
At level j+1 (and coarser levels), everything is kept.
For level i from 1 to j, the ni largest
coefficients are kept with ni =
M / (j+2-i)ALPHA.
ALPHA = 1.5 for compression and
3 for de-noising.
A default value for
the number of the coarsest approximation coefficients, since the previous
formula leads for i = j+1, to nj+1 =
Recommended values for
M are from
wdcbm(C,L,ALPHA) is equivalent to
% Load electrical signal and select a part of it. load leleccum; indx = 2600:3100; x = leleccum(indx); % Perform a wavelet decomposition of the signal % at level 5 using db3. wname = 'db3'; lev = 5; [c,l] = wavedec(x,lev,wname); % Use wdcbm for selecting level dependent thresholds % for signal compression using the adviced parameters. alpha = 1.5; m = l(1); [thr,nkeep] = wdcbm(c,l,alpha,m) thr = 19.5569 17.1415 20.2599 42.8959 15.0049 nkeep = 1 2 3 4 7 % Use wdencmp for compressing the signal using the above % thresholds with hard thresholding. [xd,cxd,lxd,perf0,perfl2] = ... wdencmp('lvd',c,l,wname,lev,thr,'h'); % Plot original and compressed signals. subplot(211), plot(indx,x), title('Original signal'); subplot(212), plot(indx,xd), title('Compressed signal'); xlab1 = ['2-norm rec.: ',num2str(perfl2)]; xlab2 = [' % -- zero cfs: ',num2str(perf0), ' %']; xlabel([xlab1 xlab2]);
Birgé, L.; P. Massart (1997), “From model selection to adaptive estimation,” in D. Pollard (ed), Festchrift for L. Le Cam, Springer, pp. 55–88.