[Eeglablist] Reproducible ICA
ivano triggiani
ivanotriggiani at gmail.com
Tue Jul 1 16:51:21 PDT 2025
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> 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 or visit
> https://sccn.ucsd.edu/mailman/listinfo/eeglablist .
>
More information about the eeglablist
mailing list