laszukdawid / PyEMD

Python implementation of Empirical Mode Decompoisition (EMD) method
https://pyemd.readthedocs.io/
Apache License 2.0
867 stars 224 forks source link

the 'spline method' and the 'parallel' method in CEEMDAN #115

Closed Harryhzh closed 2 years ago

Harryhzh commented 2 years ago

Hi Laszukdawid/Pyemd

I`m using the pyemd and thanks for your fantastic works!I got some troubles while using this package:

Firstly,the feature 'parallel' seems to not work in Ceemdan,I`ve changed the ceemdan.parallel from False into True,and set the ceemdan.processes as 4,but the process shows in the taskmanager is still single(which means there is still a lonely process of python core),and the same setting is applied well in the EEMD function,is ther anything wrong with my setting?

 ceemdan = CEEMDAN()
 ceemdan.parallel = True
 ceemdan.processes = 4

Secondly,by reading your Speedup tricks on the website,I try to change the spline method,but I couldn`t find the corresponding feature either in your help doc or in your Ceemdan.py code,so could you please tell me how can I change this method?

I'm hearing from you,thanks a lot!

laszukdawid commented 2 years ago

Hey @Harryhzh, thanks for reporting this! Let me take a look

laszukdawid commented 2 years ago

I've checked that the parallel and processes are working as expected and they are utilized. However, I can imagine that the expectation is a big higher. CEEMDAN is mostly sequential in nature, similar to EMD. There are a few bits that can be prallized, i.e. EMD decomposing noise ensemble and doing EEMD on the signal, but then there's plenty of EMD on both sets' components.

Currently parallization is only related to EEMD. I can additionally parallize noise decomposition which should help a bit. But in general, CEEMDAN isn't too performant and you might not see many active processes in task manager because for most of the time there isn't a way to parallize.

Harryhzh commented 2 years ago

Hi Laszukdawid/Pyemd

Thanks for responding,I will explore more with pyemd and try other methods to decomposite my signals

laszukdawid commented 2 years ago

I'll update the code shortly with some optimization. In general, however, there it isn't the fastest method out there.

laszukdawid commented 2 years ago

Hey @Harryhzh , I've updated the code so that CEEMDAN now decomposes noise with processes. I've run some test and the benefit shows only when using more than 50 trials (noise) and signals longer than 200 samples. The exact improvement is subjective (depends on hardware). Hopefully this helps a bit :-)

Harryhzh commented 2 years ago

Hi Laszukdawid/Pyemd,thanks for your continuous efforts! I've installed the latest package and tried on my dataset,the outcome is uplifting,it ran much faster .Thanks again for your contributions!

laszukdawid commented 2 years ago

Glad to hear that :-) I'm sorry that it isn't the most optimal solution. But, please, don't hesitate to raise other concerns, suggestions or issues that you have. You're likely not the only one with these and if I can help then I'll try.

Closing issue as it seems "enough" for now.

JhonAndersonVelasco commented 1 year ago

Hi I have another issue with parallel and processes, please, can you help me?

https://github.com/laszukdawid/PyEMD/issues/130