[Eeglablist] Reproducible ICA

Frühlinger, Christoph christoph.fruehlinger at uni-hamburg.de
Mon Jun 30 04:18:43 PDT 2025


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


More information about the eeglablist mailing list