Has anyone used binary (compiled) implementations of infomax ICA

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.

ex.

TIA,
Brian

Hi @stratumorien , welcome!

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.

Best of luck!

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.

2 Likes

ICA convergence for 64 channel, 6 hour resting state EEG (no PCA) is never fast, cudaica() provides at least a 20x speedup on my A6000…

Although I am not familiar with Picard so can’t comment on its efficiency, Ill look into it.

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.

3 Likes

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.

3 Likes

@cbrnr I tested out Picard-O on a 19 channel 10-20 EEG dataset that is 13 hours long and it converged in 38 min… very impressed…

I am new to python and slowly learning.

Using the example code as a guide I have results represented as variables K, W and Y.

K, W, Y = picard(data, n_components=19, ortho=True, random_state=0)

Is there a method to bring these back into the MNE raw object type to use its tools for viewing component properties?

Thanks,
Brian

1 Like

Nice! Yes, you can directly use mne.preprocessing.ICA(method="picard").

2 Likes

What am I doing wrong? Following MNE preprocessing tutorials…

Hello, can you please provide the full output (as preformatted text, not as a screenshot) here? Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.