sccn / roiconnect

ROI connectivity analysis in EEG
39 stars 17 forks source link

Snippet #44

Closed arnodelorme closed 6 months ago

arnodelorme commented 1 year ago

Instead of snippets, 2 seconds epochs should be created and then split into snippets. The current issue is that the code in pop_roi_connect ignores "boundary" events.

  1. Create the maximum number of epochs of 2-second length
  2. Divide them into groups of 60. This is the snippet.
  3. Run on each groups of 60
  4. If there are epochs remaining, put out a warning message
stefanhaufe commented 1 year ago

Hi Arno, Tien,

this is not completely clear to me. What is a situation where you would want to cut the 2s epochs further into snippets?

THanks and best wishes, Stefan

On 20. May 2023, at 06:15, Arnaud Delorme @.***> wrote:

Instead of snippets, 2 seconds epochs should be created and then split into snippets. The current issue is that the code in pop_roi_connect ignores "boundary" events. • Create the maximum number of epochs of 2-second length • Divide them into groups of 60. This is the snippet. • Run on each groups of 60 • If there are epochs remaining, put out a warning message — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

fpellegrini commented 1 year ago

I think what Arno meant is that should we first create epochs and afterwards group them into snippets (e.g., with 60 epochs each). I'm not sure what the problem with the boundary events is, but Tien and me will look into it.

arnodelorme commented 1 year ago

The goal would be to simply see if we can speed up computation, by performing matrix multiplication in parallel (the snippet are independent so couldn’t they be grouped in matrices). Now, with 10 snippets we multiply computation time by about 7.

nguyen-td commented 1 year ago

How about trying to extend the connectivity functions directly then? We could try to keep the way the snippets are computed as is, but then pass all of them at the same time as a big matrix to the functions and compute connectivity on this matrix. Is that the idea?

arnodelorme commented 1 year ago

Yes, sure. Whatever works that is not too complicated to see if we can speed up computation.

nguyen-td commented 6 months ago

Should be solved with #71, it should be faster now. Please reopen if there are any issues.