[psifvec,filteridx] = cwtfilters2array(wfb)
converts the CWT filter bank wfb to a reduced-weight CWT filter tensor
psifvec for deep learning. filteridx is a
bookkeeping matrix.
[psifvec,filteridx] = cwtfilters2array(___,thresh)
uses thresh to extract the significant values from each of the CWT
filters in wfb. By thresholding, you can significantly reduce the
number of learnable parameters in the filter bank.
CWT filter bank, specified as a cwtfilterbank object.
wfb must have
Boundary="periodic". For more information, see
cwtfilterbank.
thresh — Threshold 1e–8 (default) | real scalar
Threshold to apply to the CWT filters in wfb, specified as a
real scalar. cwtfilters2array uses thresh to
extract the significant values from each of the CWT filters in wfb.
The filters are normalized so that the peak value for each filter is 2
Smaller values of thresh result in more values being
retained from the CWT filters and therefore less weight reduction.
Larger values of thresh result in more weight reduction
and more divergence between the deep learning CWT and transforms computed with the
full filter bank.
Any threshold less than realmin, the smallest positive
normalized floating-point number in double precision, is set to
realmin for extracting the filter values.
Setting thresh to a value which results in no values
being retained for any individual filter results in an error.
Data Types: single | double
tf — Include lowpass filter false or 0 (default) | true or 1
Include lowpass filter, specified as a numeric or logical 1
(true) or 0 (false). Specify
true to include the lowpass (scaling) filter in
psifvec. The size of filteridx increases to
Nfilt+2-by-4, where Nfilt is the number of
filters in the CWT filter bank wfb. The meta information for the
scaling filter is included in the final row of filteridx.
Reduced-weight CWT filter tensor, returned as a 1-by-1-by-Nr
tensor, where Nr is the number of filter values greater than
thresh.
Data Types: double
filteridx — Bookkeeping matrix matrix
Bookkeeping matrix that describes psifvec, returned as an
Nfilt+1-by-4 matrix, where Nfilt is the number
of filters in the CWT filter bank wfb.
The first row of filteridx is [1
Nf 0 0], where Nf is the
number of frequency bins, or equivalently the number of time points in the wavelet
filter. Nf is equal to the SignalLength
property of wfb.
For rows 2 through Nfilt+1, the first two columns of
filteridx contain the beginning and ending frequency bins
for the corresponding wavelet filters ordered by decreasing center frequency. The
third and fourth columns of filteridx contain the beginning
and ending indices of the corresponding filter in the reshaped tensor,
psifvec.
Use array2cwtfilters to reconstruct an approximation to
the wavelet filter bank from psifvec and
filteridx.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.