<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">>> >> On Thu, Jul 31, 2014 at 10:03 AM, Laetitia Grabot <<br>
>> >> <a href="mailto:laetitia.grabot@gmail.com" target="_blank">laetitia.grabot@gmail.com</a>><br>>> >> wrote:<br>>> >> ><br>>> >> > Hi Denis,<br>>> >> ><br>
>> >> > I tried the spatio-temporal clustering with TFCE<br>>> >> (spatio_temporal_cluster_1samp_test) on alpha power data (size of<br>epoch :<br>>> >> 2s; decimation = 4 (so 501 time points)) with n_jobs = 6 and the<br>
default<br>>> >> TFCE parameter (dict(start = 0, step = 0.2)).<br>>> >><br>>> >><br>>> >> I think we need to improve the documentation on TFCE a bit. A good<br>default<br>>> >> range is probably<br>
>> >><br>>> >> dict(start=2, step=0.2)<br>>> >><br>>> >> ><br>>> >> > According to script output, 48 thresholds were used from 0 to 9.4.<br>>> >> > After 5h (!!), 10262484 clusters were found and finally after some<br>
>> >> others<br>>> >> hours the script crashed before the end ("cannot allocate memory")...<br>>> >> ><br>>> >><br>>> >> For TFCE N clusters equals N features. Howver if you do not scan the<br>
>> >> enitre<br>>> >> range of the test statistic you wont have to wait thast long.<br>>> >><br>>> >><br>>> > I tried dict(start=2, step=0.2) and dict(start=2, step=0.5), but I<br>
still<br>>> > had 5 120 000 clusters (15 threshold for step =0.5). How can I not<br>scan the<br>>> > entire range of the test, as you suggested ? I didn't understand what<br>you<br>>> > mean by "features"...<br>
>> ><br>>> ><br>>><br>>> samples : subjects or trials or observations<br>>> feaures : measured value at time t, location l, condition c, frequency f,<br>>> etc.<br>>><br>>> dict(start=2, step=0.2) would not scan the entire range since you start<br>
at<br>>> a value of 2. It depends on your effect size and your test statistic.<br>with<br>>> an f-test you might want to start at 4 (roughly the point where values<br>form<br>>> an f-dist are considered significant). Also if the maximum of your<br>
primary<br>>> test statistic is rather high, e.g. 80, you might want to jump in steps<br>of<br>>> .05 or even 1.<br>>><br>>> I'm currently using it like that (dict(start=4, step=0.5) in sensor space<br>
>> analysis and with 17640 clusters, 7 jobs and I'm waiting about 6-7<br>minutes<br>>> for a result using a repated measures anova as stat function (slower than<br>>> t-test) .<br>>><br>><br>
> Ok thanks, it's clearer! So, I tried dict(start=4, step=0.5), I got 5 120<br>000 clusters, 14 thresholds and I got no significant clusters.<br><br>Note. You'll always get as many clusters in TFCE as your ndarrays has<br>
cells, or in other words X.size if X is an array. The speed will then<br>depend on the number of thresholds you visit and the size of the 'clusters'<br>in that range.<br><br></blockquote><div><br></div><div>Yes, I get that, my 5 210 000 corresponds to n_vertices*epoch_duration.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">> And I didn't find the cluster I found with p = 0.01 in classical<br>
analysis...<br><br>In my experience TFCE is significantly more sensitive than clustering with<br>classical thresholding. If you do not happen to find a cluster you should<br>compare your start value to the actual threshold computed. Maybe you<br>
excluded the range in which your effect resides (smaller than 4 in that<br>case?).<br><br></blockquote><div><br></div><div>You're totally right, my t_threshold in classical analysis was 3.49, so smaller than 4. I'll try with that.</div>
<div>Again thanks a lot!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">> The computation lasted 84min, so that remains quite long.<br>
<br>It's expected to last long since you have more clusters. This is a<br>consequence of method.<br>I haven't run simulations but I'd expect the TFCE to scale linearly to the<br>number of permutations and the number of clusters and of course to their<br>
sizes within the thresholds.</blockquote></div>