[Eeglablist] Reproducible ICA
Frühlinger, Christoph
christoph.fruehlinger at uni-hamburg.de
Wed Jul 2 00:39:07 PDT 2025
Dear Ivano,
thank you for your advice. I have already tried that position and I keep getting different ICA results.
Best
Christoph
Von: ivano triggiani <ivanotriggiani at gmail.com>
Gesendet: Mittwoch, 2. Juli 2025 01:51
An: Frühlinger, Christoph <christoph.fruehlinger at uni-hamburg.de>
Cc: eeglab list <eeglablist at sccn.ucsd.edu>
Betreff: Re: [Eeglablist] Reproducible ICA
Hi,
Try something like this:
rng(42); % Set seed before ICA
EEG = pop_runica(EEG, 'extended', 1);
Ivano
---
Antonio Ivano Triggiani, Ph.D.
________________________________________________
On Mon, Jun 30, 2025, 3:57 PM Frühlinger, Christoph via eeglablist <eeglablist at sccn.ucsd.edu<mailto:eeglablist at sccn.ucsd.edu>> wrote:
Dear all,
I want to insert a random seed in my preprocessing script before the ICA to get reproducible results. I have tried several settings of the random seed at different locations in the script (at the top, right before the ICA, at the top of the pop_runica() function) as suggested in previous threads of the mailing list. However, I keep getting different ICA results for the same dataset. Some (potentially) relevant notes regarding the script: I use a parfor loop to call the actual preprocessing function like:
```
parfor i_Sub = 1:length(Files)
run_preproc()
end
function run_preproc()
# basic preprocessing
EEG = pop_runica(EEG, 'icatype', 'runica', 'pca', rank, 'extended', 1, 'interupt', 'off');
# some more preprocessing
end
```
I would appreciate it if you could help me!
Best wishes
Christoph
_______________________________________________
To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu<mailto:eeglablist-unsubscribe at sccn.ucsd.edu> or visit https://sccn.ucsd.edu/mailman/listinfo/eeglablist .
More information about the eeglablist
mailing list