question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parallel Function not working in EEMD

See original GitHub issue

I’m trying to run the EEMD function on environmental data. The function works when parallel is set to False and processes is set to None. However, when I turn parallel to True, and set processors to any integer, I get an error. I’d really like be able to get this feature working because I need to speed up the processing .

`

#pandas dataframe
data_temp 

if __name__ == "__main__":
 
 eemd = EEMD(trials= 100, 
                        noise_width = 0.05, 
                        ext_EMD=None, 
                        separate_trends= True,
                        DTYPE = np.float16,
                        spline_kind='akima',
                        parallel = True,
                        processes = 1)

   eemd.noise_seed(42)
   eIMF = eemd(data_temp[var].values).T #Transverse to match with index
eIMF = pd.DataFrame(eIMF, index=data_temp.index)

` When I run this code, it seems like the decomposition gets skipped and tries to put the data into a dataframe, yet the dataframe hasn’t been defined. I’ve attached a screenshot of the error.

image

I’m running emd-signal version 0.2.15 with Anaconda, on Windows using a Ryzen 7 CPU.

I’d appreciate any help.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Saul-the-engineercommented, Jan 24, 2022

It looks like I figured it out. If I’m trying to run the eemd script in parallel within a for loop on windows, all the subsequent actions need to be inside of the if statement.

Thank you so much for the help, this shortened the runtime from 118 seconds to 14 seconds.

for j, var in enumerate(data_temp.columns):
        if __name__ == '__main__':
            eemd = EEMD(trials= 1000, 
                    noise_width = 0.05, 
                    ext_EMD=None, 
                    separate_trends= True,
                    DTYPE = np.float16,
                    spline_kind='akima',
                    parallel = True,
                    processes = 2)
            eemd.noise_seed(42)
            eIMF = eemd(data_temp[var].values).T
            out = pd.DataFrame(eIMF, index=data_temp.index)
            label = [var + '_imf_' + str(k+1) for k in range(len(out.columns))]
            out.columns = label
0reactions
laszukdawidcommented, Jan 24, 2022

Great to hear that 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parallel Implementation of the Ensemble Empirical Mode ...
the scale mixing (or mode mixing) problem of the. EMD.2 By introducing finite-amplitude white noise, the EEMD deals with an ensemble of datasets....
Read more >
| Ensemble empirical mode decomposition (EEMD)
It is simple result of adding (in grand average) two or more signals that are not phase synchronised and probably have different "frequencies"....
Read more >
eemd
EMD performs operations that partition a series into 'modes' (IMFs; Intrinsic Mode Functions) without leaving the time domain. It can be compared to...
Read more >
(PDF) Parallel implementation of Multi-dimensional Ensemble ...
PDF | In this paper, we propose and evaluate two parallel implementations of Multi-dimensional Ensemble Empirical Mode Decomposition (MEEMD) ...
Read more >
emd.support — emd 0.5.4 documentation - Read the Docs
#!/usr/bin/python # vim: set expandtab ts=4 sw=4: """ Helper functions for interacting ... Useful for people without a dev-install to run tests perhaps....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found