waveletScattering function R2021a change to number of filters output

5 Ansichten (letzte 30 Tage)
I’m inquiring on if I should expect a discrepancy I’m seeing between my Wavelet Scattering Tansform (WST) results compared to results from an older MATLAB version due to the R2021a change to the "waveletScattering" function where:
"the method for determining how to space linearly those frequencies lower than the invariance scale has also changed. .... [The] number of filters you obtain may be different than in previous releases."
I am comparing my results using MATLAB R2021a to a paper who analyzed the same data using MATLAB R2018b. They reported to have 75 paths in their WST object, while mine has 40 paths. We bothed used data that is 250 samples long and sampled at 360Hz with an invariance scale of 0.5s.
sn = waveletScattering('SignalLength',250, 'InvarianceScale',0.5,'SamplingFrequency',360);
spaths = paths(sn);
num_paths = size(spaths{1},1) + size(spaths{2},1) + size(spaths{3},1)
num_paths = 40
If you ran this script in MATLAB R2018b, would it return "num_paths = 75" due to the differences in the "waveletScattering" function? Is there a way to change the resolution in the paths direction (not the scattering time windows direction) to get "num_paths = 75" in R2021a?
  1 Kommentar
William George
William George am 19 Apr. 2023
After being informed that the 'paths' function wasn't released yet in R2018b, I am rephrasing my question here using only functions that are avaliable in R2018b. Would the script below return different results due to the changes made to the frequency spacing calculations in the 'waveletScattering' function that were implemented in R2021a?
x = randn(250,1); % example signal
sn = waveletScattering('SignalLength',250, 'InvarianceScale',0.5,'SamplingFrequency',360); %wavelet scattering object in question
feat = featureMatrix(sn,x); %wavelet scattering features (sized num_paths x num_TimeWindows)
num_paths = size(feat,1) %number of frequency paths in the wavelet scattering object
num_paths = 40
Would this script return "num_paths = 75" if ran in R2018b, prior to the changes made to the 'waveletScattering' function in R2021a?
For reference, please see the row of "Version History" titled "Highest wavelet center frequency is computed using geometric mean" for the 'waveletScattering' documentation at the URL provided below. I am wondering if this changed the number of paths returned.
https://www.mathworks.com/help/wavelet/ref/waveletscattering.html

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Gokul Nath S J
Gokul Nath S J am 19 Apr. 2023
Hi William George,
Based on my understanding, it seems that you would like to know the result if the paths were calculated in R2018b.
Please note that 'paths' function was not available in R2018b. For verification, if you run the same script in R2018b, it will throw out an error message. Further please note that, there is an optimized way to compute the paths as described below,
sn = waveletScattering('SignalLength',250, 'InvarianceScale',0.5,'SamplingFrequency',360);
[spaths, npaths] = paths(sn);
num_paths = sum(npaths);
For further information, kindly refer to the following link.
Thanks,
Gokul Nath S J
  2 Kommentare
William George
William George am 19 Apr. 2023
Bearbeitet: William George am 19 Apr. 2023
Hi Gokul Nath, thank you for that info regarding the 'paths' function. However this doesn't fully answer my question regarding the 'waveletScattering' function.
I will rephrase my question using only functions that are avaliable in R2018b:
x = randn(250,1); % example signal
sn = waveletScattering('SignalLength',250, 'InvarianceScale',0.5,'SamplingFrequency',360); %wavelet scattering object in question
feat = featureMatrix(sn,x); %wavelet scattering features (sized num_paths x num_TimeWindows)
num_paths = size(feat,1) %number of frequency paths in the wavelet scattering object
num_paths = 40
Would this script return "num_paths = 75" if ran in R2018b, prior to the changes made to the 'waveletScattering' function in R2021a?
William George
William George am 19 Apr. 2023
Gokul Nath, I also added a comment to my original question providing this same script using 'featureMatrix' instead of 'paths' to calculate num_paths so that it can be ran in R2018b. Thanks again for that clarification. Hoping that helps to find the answer I'm looking for

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu AI for Signals and Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by