[FieldTrip] Setting cfg.randomseed for FT_COMPONENTANALYSIS() doesn't reproduce components for cfg.method='runica'

Johanna Zumer johanna.zumer at gmail.com
Wed Feb 4 17:39:23 CET 2015


Dear Holger,

Please see the discussion on this bug:
http://bugzilla.fcdonders.nl/show_bug.cgi?id=2585
in which it is a known bug, but still an open discussion as to solution.

Sorry for the problem, but perhaps your email will help spur a solution...

Cheers,
Johanna

2015-02-04 16:24 GMT+00:00 Holger Krause <
Holger.Krause at med.uni-duesseldorf.de>:

> Dear all,
>
> documentation of FT_COMPONENTANALYSIS states:
>
> > You may specify a particular seed for random numbers called by
> > rand/randn/randi, or the random state used by a previous call to this
> > function to replicate results. For example:
> >   cfg.randomseed   = integer seed value of user's choice
> >   cfg.randomseed   = comp.cfg.callinfo.randomseed (from previous call)
>
> Aiming at reproducing independent components, I would expect
>
>     cfg.method       = 'runica';
>     cfg.randomseed   = 5;
>     comp = ft_componentanalysis(cfg, some_preprocessed_data);
>
> to yield the same results as
>
>     cfg.method       = 'runica';
>     cfg.randomseed   = 5;
>     comp = ft_componentanalysis(cfg, some_preprocessed_data);
>
> Unfortunately, this is not (always) the case. As far as I can see, all the
> FT
> functions seem to handle the 'randomseed' option properly. It is
> 'external/eeglab/runica.m', which is nasty, and sets the state of the prng
> to
> a value depending on system time (line 812):
>
> >    rand('state',sum(100*clock));  % set the random number generator
> state to
> >                               % a position dependent on the system clock
>
> I'm not sure, what's FT's policy regarding making changes to external
> toolboxes. In this case, I would recommend to delete the aforementioned
> line,
> as it effectively renders fieldtrip's aims to have reproducible pseudo
> random
> numbers void. And, without this line, two consecutive calls of
> ft_componentanalysis() seem to produce identical results (checked by eye in
> ft_databrowser()).
>
> Could some FT developer please comment on this?
>
> Cheers,
>
> Holger
>
> --
> Dr. rer. nat. Holger Krause                       MEG-Labor, Raum
> 13.54.-1.84
> Telefon: +49 211 81-19031          Institut für klinische
> Neurowissenschaften
> http://www.uniklinik-duesseldorf.de/klinneurowiss        Uniklinik
> Düsseldorf
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150204/79d5d385/attachment-0001.html>


More information about the fieldtrip mailing list