I am a long time user of EEGLAB in MATLAB but now evaluating other options. I use cudaica() a compiled cuda implementation of the popular extended infomax ICA algorithm.
Is there a straight forward way in MNE to define the ICA method to use any binary (non python) ICA executable where the output is simply the weights and spheres?
I’m surprised in searching I am not getting any hits for ica_linux or cudaica_win in the forum.
No I don’t believe so. You’d probably have to export your data from MNE (e.g. epochs.get_data() ) and figure out how to pass that to cudaica directly.
May I ask why you want to do that? The Picard package implements several different ICA algorithms and is extremely fast. It is also a method supported by MNE out of the box if you have installed this package.
Depends on what you call “fast”. EEGLAB’s ICA implementation is very slow, and by that I mean both its runica and binica commands. Last time I tried, Picard was orders of magnitudes faster than even binica. So yes, just try and see if it’s fast enough for your use case. If not, you can always feed the EEG array to some CUDA implementation.
If you have 6 hours of data, there is something about the ICA that may be important to realize: it is based on statistics (stuff like kurtosis, means, stds, etc). As you add more data, these statistics can be estimated more reliably, but there are diminishing returns. Once you have “enough data” the statistics will be “good enough” and adding more will not make a noticeable difference. Hence the decim parameter of the ICA object. By setting decim to a value higher than 1, only every nth sample is used for the ICA computations. This speeds things up a lot and you can experiment with higher values for decim and see how the estimated ICA components change, if at all.