Back to the main page.

Bug 3277 - speed up ft_statfun_actvsblT

Status CLOSED FIXED
Reported 2017-03-30 17:40:00 +0200
Modified 2019-08-10 12:40:35 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2017-03-30 17:40:03 +0200

On 19 Mar 2017, at 18:20, Babajani-Feremi, Abbas wrote: I was using “ft_freqstatistics.m” to perform statistical analysis on my ECoG data, and found that it took about a day to be finished in one dataset. I realized that by changing only one line (Line #116) of code in subfunction “ft_statfun_actvsblT.m”, the execution time reduced drastically to be less than an hour. I am wondering if you would like to apply this change in new version of Fieldtrip. Old code: timeavgdat=repmat(eye(nchan*nfreq),ntime,1)*reshape(meanreshapeddat,(nchan*nfreq),nrepl); New code: timeavgdat=repmat(reshape(meanreshapeddat,(nchan*nfreq),nrepl),ntime,1); %ABF change


Robert Oostenveld - 2017-03-30 17:49:17 +0200

The old code is very memory inefficient, which (for large data) makes it slow as well. Thanks for the suggestion, I have incorporated it. [master 6de5a6d] ENH - speed up ft_statfun_actvsblT, see http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3277 (thanks to Abbas) 1 file changed, 4 insertions(+), 6 deletions(-) mac011> git commit statfun/ft_statfun_actvsblT.m [master 9c63261] cleaned up whitespace, no functional changes 1 file changed, 31 insertions(+), 31 deletions(-)


Robert Oostenveld - 2019-08-10 12:34:26 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.


Robert Oostenveld - 2019-08-10 12:40:35 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.