using cfg.correctm = 'cluster' and related memory issues.

Sameer Walawalkar sameer at ANDREW.CMU.EDU
Mon Jul 2 19:04:47 CEST 2007


Hello,

I am running into memory issues while trying to do non-parametric
statistical testing for coherence differences for my Neuromag 306 data.

  The statement causing overflow is line 277 in statistics_montecarlo:
statrand = zeros(size(statobs,1), size(res,1));
This would be a matrix of size 50631525 X 100 corresponding to some 40 GB!
(Am I correct in assuming that the 100 is from cfg.numrandomization)?

This statement is evoked if cfg.correctm = 'cluster';
I could use cfg.correctm = max but I dont think this will do the right
analysis.

The one thing I can think of is changing cfg.channelcmb to try and reduce
the number of combinations tried (but is not very preferable atleast right
now). Is there anything else that comes to mind?

The cfg I am using and other info is added below.

Thank you for your time and help.
sameer

>>cfg = [];
cfg.channelcmb = {'MEG' 'MEG'};
cfg.method = 'montecarlo';
cfg.statistic = 'indepsamplesZcoh';
cfg.clusteralpha = 0.05;
cfg.clusterstatistic = 'maxsum';
cfg.clusterthreshold = 'nonparametric';
cfg.minnbchan = 2;
cfg.tail = 0;
cfg.clustertail = 0;
cfg.alpha = 0.05;
cfg.numrandomization = 100; % make it larger for better testing
cfg.precision          = 'single'; % experimenting to save memory
cfg.label = CSD_LL_200_400.label ;
cfg.channelcmb = CSD_LL_200_400.labelcmb;


[statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400);

Note: I use Cross Spectral density instead of coherence as coherence does
not keep trials.

At the debug prompt after the error I have:

K>> whos
   Name                  Size                   Bytes  Class
Attributes

   Nrand                 1x1                        8  double
   cfg                   1x1                 60159588  struct
   dat              326655x127              331881480  single
complex
   design                1x127                   1016  double
   res                 100x1x127               101600  double
   statfull              1x1                405052324  struct
   statfun               1x1                       16  function_handle
   statobs        50631525x1                405052200  double
   time_eval             1x1                        8  double
   time_pre              1x1                        8  double

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.



More information about the fieldtrip mailing list