Back to the main page.

Bug 2903 - replace the FT findcluster function with the refactored version from LIMO

Status CLOSED WONTFIX
Reported 2015-05-28 16:34:00 +0200
Modified 2018-11-12 11:35:02 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 enhancement
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2015-05-28 16:34:20 +0200

The LIMO version (which starts off from my implementation) is about 2x faster for the clustering. See https://github.com/LIMO-EEG-Toolbox/limo_eeg and https://github.com/LIMO-EEG-Toolbox/limo_cluster_test


Robert Oostenveld - 2015-05-28 16:34:59 +0200

it is important to check that the input and output variables are exactly the same, otherwise some small changes might be needed.


Eelke Spaak - 2015-05-29 10:58:51 +0200

In the current FT version, a lot of the heavy lifting in findcluster() is done by a mex-file combineClusters (if available). It would be great if we can do it even faster by just using matlab code, but it's worth checking that the mex-file is actually being used when doing benchmarking (as an m-file fallback is also available). Also, there are two general cases of clustering: (1) across channels, which is an irregular dimension requiring neighbourhood structure; and (2) only across regular dimensions. These two might result in different decisions as to which code is fastest.


Jan-Mathijs Schoffelen - 2018-11-12 11:34:53 +0100

Eelke's mex-file based merging of clusters across space (channels) seems to be substantially faster than the limo implementation. I quickly checked this on windows machine using matlab2016b. Although not extensively tested on all platforms, shapes of onoff matrices and neighbourhood matrices etc I don't see the need to invest in this at this moment.