# 1-vertex clusters in permutation cluster test with TFCE

**URL:** <https://mne.discourse.group/t/1-vertex-clusters-in-permutation-cluster-test-with-tfce/7997>\
**Category:** Support & Discussions\
**Tags:** ﻿source-localization, meg\
**Created:** [December 13, 2023, 1:11pm UTC](https://mne.discourse.group/t/1-vertex-clusters-in-permutation-cluster-test-with-tfce/7997 "2023-12-13T13:11:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![okapi](https://avatars.discourse-cdn.com/v4/letter/o/da6949/32.png) [@okapi](https://mne.discourse.group/u/okapi)\
**Post date:** [December 13, 2023, 1:11pm UTC](https://mne.discourse.group/t/1-vertex-clusters-in-permutation-cluster-test-with-tfce/7997/1 "2023-12-13T13:11:26Z")

</div>

- MNE version: 1.6.0
- operating system: Arch Linux, Linux 6.0.11-arch1-1 #1 SMP PREEMPT\_DYNAMIC Fri, 02 Dec 2022 17:25:31 +0000 x86\_64 GNU/Linux

Dear all,

I’m trying to run permutation cluster test, on 5124 brain vertices and 121 time points. I’m interested in how the effect I observe at the sensor level is localized in the brain at different time points over the specified 121-length time interval. I use TFCE in this test to have more or less ‘objective’ measure of threshold.

This is an example of my code below:

```python

threshold_tfce = dict(start=0, step=0.2)
adjacency = mne.spatial_src_adjacency(src)
T_obs_tfce, clusters, p_values, H0 = clu = \
    spatio_temporal_cluster_1samp_test(X_arr, 
                                        n_jobs=None,
                                        threshold=threshold_tfce,
                                        adjacency=adjacency,
                                        buffer_size=None,
                                        tail=1, n_permutations=1024)

```

I noticed that when I run such a test I get the output that there are 620004 clusters specified, which probably means that all these clusters are 1 vertex in size, as 5124\*121=620004. I also observed that if I remove time dimension, there are still only 1-vertex clusters (5124 clusters in this case). My adjacency matrix should be fine, it worked with the same test without TFCE.

Sorry, I’m not an expert in this test, but I decided to ask as it looks a bit strange for me… Shouldn’t the clusters be represented not as 1 vertex clusters, but rather as a group of vertices?  
When I run the same function without TFCE on the same data, I get only 22 clusters specified, and their size is greater than 1. And I can see how the clusters change in time in the brain when I visualize them. On the opposite, with TFCE, when I visualize all of the 1-vertex ‘significant clusters’ in time, despite all together they look like a cluster, at each individual time point there’s only one significant vertex. So at individual time points the picture seems meaningless…

I’m very sorry, maybe I misunderstand the TFCE concept of something. I would be very grateful for any clarification.

All the best,  
Viktoria

---

<div class="post-metadata">

**Author:** ![drammock](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/drammock/32/4_2.png) [@drammock](https://mne.discourse.group/u/drammock)\
**Post date:** [December 13, 2023, 6:39pm UTC](https://mne.discourse.group/t/1-vertex-clusters-in-permutation-cluster-test-with-tfce/7997/2 "2023-12-13T18:39:10Z")

</div>

This is expected behavior. There is a (short) explanation in this tutorial section: [Statistical inference — MNE 1.6.0 documentation](https://mne.tools/stable/auto_tutorials/stats-sensor-space/10_background_stats.html#threshold-free-cluster-enhancement-tfce). Basically, with TFCE you get a t-value per vertex/timepoint, instead of a t-value per cluster. The clusters are then defined as “contiguous groups of vertices/timepoints that are suprathreshold”. The `adjacency` and `time_step` params determine what counts as “contiguous”.

> [@okapi](#):
>
> with TFCE, when I visualize all of the 1-vertex ‘significant clusters’ in time, despite all together they look like a cluster, at each individual time point there’s only one significant vertex.

I’m not sure I quite follow this, but when you say “despite all together they look like a cluster” then maybe they are? This other tutorial has an example of how to find the significant clusters after TFCE (it’s sensor-space data, not brain, but the idea is the same): [Visualising statistical significance thresholds on EEG data — MNE 1.6.0 documentation](https://mne.tools/stable/auto_tutorials/stats-sensor-space/20_erp_stats.html) — `significant_points = cluster_pv.reshape(t_obs.shape).T < 0.05`

---

<div class="post-metadata">

**Author:** ![okapi](https://avatars.discourse-cdn.com/v4/letter/o/da6949/32.png) [@okapi](https://mne.discourse.group/u/okapi)\
**Post date:** [December 13, 2023, 7:05pm UTC](https://mne.discourse.group/t/1-vertex-clusters-in-permutation-cluster-test-with-tfce/7997/3 "2023-12-13T19:05:33Z")

</div>

Thank you a lot for your answer! Now it’s much more clear, probably I used another function to form the cluster after the permutation test. Maybe my visualization was a bit strange because of that. I’ll check with what you suggested, thanks again!
