OverLordGoldDragon / ssqueezepy

Synchrosqueezing, wavelet transforms, and time-frequency analysis in Python
MIT License
599 stars 92 forks source link

synchrosqueezing ITD and EMD #65

Closed falseywinchnet closed 1 year ago

falseywinchnet commented 2 years ago

You may be aware that there has been recent research effort to combine synchrosqueezing with Empirical mode decomposition. However, EMD has some shortcomings and it would seem there is a 21st century decomposition technique called intrinsic time-scale decomposition " Intrinsic time-scale decomposition: time−frequency−energy analysis and real-time filtering of non-stationary signals" Mark G Frei and Ivan Osorio, doi: 10.1098/rspa.2006.1761

The original publication from 2007 is paywalled, but accessible via sci-hub. It features some insightful representation of the work that makes it evident that ITD is a fundamentally new and powerful weapon, as great as wavelets or FFT, which is missing from our arsenal. I don't know if it's a reversible decomposition method however it seems to be described as such.

Screenshot_4 I believe this screenshot sums it up pretty nicely. From page four we have: "4. The ITD method overcomes essentially all the limitations of EMD described earlier. In particular, the ITD only involves O(n) computations, operates in realtime, and although it can be applied to windows of data, it naturally operates on inter-extrema segments of data, with a time-delay equal to the inter-extrema interval, which is determined by the frequency content of the signal being decomposed. When applied to a window of data, the unavoidable edge effects that stem from uncertainty regarding wave morphology in the intervals before the first and after the last signal extrema do not propagate inward as they can with the EMD, but rather are temporally constrained to margins defined by the first and last two extrema in the window. The ITD does not use splines and thus avoids the ‘difficulties’ they introduce. By construction, the ITD method guarantees proper rotation components2 and precisely preserves temporal information regarding TFE information and all the signal critical points. Finally, and perhaps most importantly, the sifting procedure introduced by Huang et al. (1998) in an attempt to produce proper rotation components with the EMD, but which also causes smearing and smoothing of TFE information, is not needed in the ITD. However, for heuristic purposes, we investigated its application within the ITD framework and determined that, as with the EMD, it has the general effect of smoothing variations in amplitude between adjacent extrema. Exhaustive sifting within a window of data results in a component that is purely frequency modulated with constant amplitude. Unlike the EMD, after each ITD sifting iteration, the extrema points remain identical to those of the input signal."

The best explanation of the core algorithm i could find, and i do not know if this is is correct, i only know that the algorithm isn't presented all at once elsewhere, is found on https://arxiv.org/pdf/1404.3827v1.pdf on page 26.

There is also a matlab implementation found at https://viewer.mathworks.com/?viewer=plain_code&url=https%3A%2F%2Fwww.mathworks.com%2Fmatlabcentral%2Fmlc-downloads%2Fdownloads%2Fbacae6a7-59d2-4ad9-89b8-f4d5dd60f422%2F3d85f570-571f-4e45-8049-b0e10d205469%2Ffiles%2Fitd.m&embed=web

From " The De-noising Algorithm Based on Intrinsic Time-scale Decomposition" doi:10.4028/www.scientific.net/AMR.422.347 jinxia zeng, goufu wang, et al, in 2008, (also paywalled but available on scihub), we find they show evidence supporting that ITD offers similar computational complexity to wavelet transforms but improved noise reduction similar to EMD, while being orders of magnitude easier to compute, as claimed by frei and osorio. Unlike wavelets, the issue of a wavelet base is not encountered making this method superior to both.

I would genuinely like to see it accessible in python and feel this is the best place to announce discussion about it. I have sought help from some engineers from around the world to look into adapting it, perhaps for this repository and directly for inclusion in scipy and numpy libraries. I feel this method will really transform neural network inputs. I have also heard about, but not seen research publications concerning, the application of synchrosqueezing to EMD, so it may even be possible to go further and apply it to ITD, resulting in a truly powerful and transcendent method.

falseywinchnet commented 2 years ago

https://github.com/falseywinchnet/demoframework/blob/main/ITD.ipynb @OverLordGoldDragon

OverLordGoldDragon commented 2 years ago

Thanks for your submission.

I currently have no plans on improving upon SSQ. If implementation assistance is needed, I note that v0.6.0 has much simpler code while producing identical outputs. Few other points:

falseywinchnet commented 2 years ago

I was able to use SSQ on EFD to achieve a better result in individual EFD decompositions. I also moved my code and added a bunch of other algorithms since i made this posting. https://github.com/falseywinchnet/PyITD Featured here are implementations for ITD, EFD, and some other stuff i have been playing with.

sincerely

On Fri, Jun 17, 2022 at 3:55 PM John Muradeli @.***> wrote:

Thanks for your submission.

I currently have no plans on improving upon SSQ. If implementation assistance is needed, I note that v0.6.0 has much simpler code while producing identical outputs. Few other points:

  • "the issue of a wavelet base is not encountered making this method superior to both" I don't understand. What's "wavelet base"? Note, there's nothing that really breaks Heisenberg's uncertainty in the worst case, without assumptions on input (which in literature SSQ is said to make, but actually doesn't). Such claims should be treated with skepticism. Wavelets are optimal in an important sense.
  • https://github.com/falseywinchnet/demoframework/ -- thanks. With some polishing, and visual demos in README, I recommend advertising at r/MachineLearning https://www.reddit.com/r/MachineLearning/.

— Reply to this email directly, view it on GitHub https://github.com/OverLordGoldDragon/ssqueezepy/issues/65#issuecomment-1159220990, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUYJQQ4C3IEHU6NOOPIRZELVPTQ47ANCNFSM5S2RFQWQ . You are receiving this because you authored the thread.Message ID: @.***>