lciti / cvxEDA

Algorithm for the analysis of electrodermal activity (EDA) using convex optimization
GNU General Public License v3.0
60 stars 28 forks source link

I was wondering about the complexity of cvxeda. #12

Open Momellouky opened 5 months ago

Momellouky commented 5 months ago

The cvxeda method is included in the neurokit2 python package. I wanted to use it to decompose the phasic and tonic signals from the raw EDA signal. However, as the sampling rate was quite high (700 Hz, and there is no possibility of downsampling), The algorithm takes minutes (I estimate it takes hours in my case, as I have a total of 60 hours of EDA recordings). So I'd like to know the complexity (the big O notation) of this algorithm. This information will help me justify the long execution of the algorithm on my data.

Yours sincerely

lciti commented 5 months ago

Assessing the complexity in big O notation can be difficult and even misleading in this case, for a number of reasons:

I have put this together from bit and pieces that I had around and I have not tried it myself. You could have a go and see if it works.

In your case, the easiest gains would be gained by downsampling. A 700 sps sampling frequency is unnecessarily high for a slow signal like EDA. You say you can't downsample it but provide no reason for that. If at all possible, I would reconsider that.