Back to the main page.
Bug 3030 - private/clusterstat: function is unnecessarily very slow when clustering scalar-valued 'pos' vector with triangulated neighbourhood
Status | CLOSED FIXED |
Reported | 2015-12-16 14:14:00 +0100 |
Modified | 2016-01-14 21:25:23 +0100 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 normal |
Assigned to: | Jan-Mathijs Schoffelen |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Jan-Mathijs Schoffelen - 2015-12-16 14:14:55 +0100
this is due to the function spending a lot of time evaluating if ~isfinite(channeighbstructmat) and because in findcluster there's an unnecessary call to spm_bwlabel for each vertex (where the intention is to find clusters over time and frequency for each vertex, which in the case of a scalar value per vertex is not needed). I intend to make two changes: clusterstat: evaluate ~isfinite(channeighbstuctmat) only once, creating a flag that can be conditionally evaluated. findcluster: only go into spm_bwlabel if nfreq*ntime>1