I was running spatio_temporal_cluster_1samp_test on my EEG data and noticed differences in results with and without adjacency.
Initially I used this code to compute adjacency, as it doesn’t exist in get_builtin_ch_adjacencies list (I work with the actiCap 10-20 64-electrode system):
adjacency, ch_names = find_ch_adjacency(eeg_info.info, ch_type=“eeg”)
adjacency = combine_adjacency(adjacency, n_times)
Then I used this function:
F_obs, clusters, cluster_pv, H0 = spatio_temporal_cluster_1samp_test(
X, n_permutations=1000, adjacency = adjacency, threshold=None, tail=0,
out_type=‘mask’, n_jobs=1)
After plotting following this tutorial, I got this picture. As you can see, the majority of electrodes are grouped in a cluster, which is rather odd.
After changing the adjacency and not changing the plotting function
adjacency = None
I got a different picture. The number of electrodes in the cluster noticeably decreased. And honestly, this way it seems more realistic compared to almost the whole head being significant.
Now I wonder if adjacency should be specifically computed here or set to None or even False. As I understand, this parameter is more common in the case of MEG studies, so the approach might differ in my case.
P.S. The data itself is fine; this situation is recurring among several of my EEG projects.





