# permutation clustering test using TFCE

**URL:** https://mne.discourse.group/t/permutation-clustering-test-using-tfce/769
**Category:** Mailing List Archive (read-only)
**Tags:** list-archive
**Created:** [July 31, 2014, 8:03am UTC](https://mne.discourse.group/t/permutation-clustering-test-using-tfce/769 "2014-07-31T08:03:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)
#### Post date: [July 31, 2014, 8:03am UTC](https://mne.discourse.group/t/permutation-clustering-test-using-tfce/769/1 "2014-07-31T08:03:37Z")

</div>

Hi Denis,

I tried the spatio-temporal clustering with TFCE  
(spatio\_temporal\_cluster\_1samp\_test) on alpha power data (size of epoch :  
2s; decimation = 4 (so 501 time points)) with n\_jobs = 6 and the default  
TFCE parameter (dict(start = 0, step = 0.2)).  
According to script output, 48 thresholds were used from 0 to 9.4.  
After 5h (!!), 10262484 clusters were found and finally after some others  
hours the script crashed before the end ("cannot allocate memory")...

I tried on shorter data (1s so 250 time points) but it was also too long  
and too memory-demanding. Then I tried to change the step parameter to  
decrease the number of thresholds to test. I took step =0.5. 17 thresholds  
were used from 0 to 8. 5121000 clusters were found and my script also ended  
up crashing. So... what do you suggest to get acceptable computation time?

By the way, with p\_threshold =0.001, I got no cluster; with p\_threshold  
=0.01, I got one occipito-parietal cluster (pvalue = 0.026) lasting around  
500ms, after something about 10min of computation.

Hoping that it is useful for you,  
Best,  
Laetitia G.  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20140731/fc9ce509/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140731/fc9ce509/attachment.html)

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)
#### Post date: [July 31, 2014, 1:14pm UTC](https://mne.discourse.group/t/permutation-clustering-test-using-tfce/769/2 "2014-07-31T13:14:01Z")

</div>

Thanks Latitia,

> Hi Denis,
> 
> I tried the spatio-temporal clustering with TFCE

(spatio\_temporal\_cluster\_1samp\_test) on alpha power data (size of epoch :  
2s; decimation = 4 (so 501 time points)) with n\_jobs = 6 and the default  
TFCE parameter (dict(start = 0, step = 0.2)).

I think we need to improve the documentation on TFCE a bit. A good default  
range is probably

dict(start=2, step=0.2)

> According to script output, 48 thresholds were used from 0 to 9.4.  
> After 5h (!!), 10262484 clusters were found and finally after some others

hours the script crashed before the end ("cannot allocate memory")...

> 

For TFCE N clusters equals N features. Howver if you do not scan the enitre  
range of the test statistic you wont have to wait thast long.

> I tried on shorter data (1s so 250 time points) but it was also too long

and too memory-demanding. Then I tried to change the step parameter to  
decrease the number of thresholds to test. I took step =0.5. 17 thresholds  
were used from 0 to 8. 5121000 clusters were found and my script also ended  
up crashing. So... what do you suggest to get acceptable computation time?

> 

See above. Btw for roughtly 10.000 clusters with 15-20 thresholds I'm  
waiting for roughly 15-20 minutes per iteration (multiple iterations with  
step\_down=0.05).

> By the way, with p\_threshold =0.001, I got no cluster; with p\_threshold

=0.01, I got one occipito-parietal cluster (pvalue = 0.026) lasting around  
500ms, after something about 10min of computation.

> 

I'm not sure what you refer to by `p_threshold`. Either you pass a dict or  
a float. The latter will be a classical cluster permuation analysis, the  
former TFCE.  
You can howver use the p\_threhold as start value for TFCE.

> Hoping that it is useful for you,  
> Best,  
> Laetitia G.

Yes, thanks!  
Best,  
Denis

> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it

is

> addressed. If you believe this e-mail was sent to you in error and the

e-mail

> contains patient information, please contact the Partners Compliance

HelpLine at

> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in

error

> but does not contain patient information, please contact the sender and

properly

> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20140731/0dd35b8e/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140731/0dd35b8e/attachment.html)
