# Cluster Analysis for Time-Frequency Data

**URL:** <https://mne.discourse.group/t/cluster-analysis-for-time-frequency-data/1831>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [May 2, 2019, 6:01pm UTC](https://mne.discourse.group/t/cluster-analysis-for-time-frequency-data/1831 "2019-05-02T18:01:01Z")\
**Posts on this page:** 3\
**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:** [May 2, 2019, 6:01pm UTC](https://mne.discourse.group/t/cluster-analysis-for-time-frequency-data/1831/1 "2019-05-02T18:01:01Z")

</div>

External Email - Use Caution

Hi all,

I have used \*spatio\_temporal\_cluster\_1samp\_test\* on my time-frequency data  
(power (EpochsTFR) with a shape:[epochs X chan X freqs X time] ). I have  
read the cited paper (MarisOostenveld07) for the permutation tests.  
However, it is still not clear to me what these functions are exactly doing. I  
have confused about the cluster analysis after seeing my plots. I have  
attached parts of my code and my results to this email.  
[image: timefreq\_stat.png]  
The first row shows the power activities and the second row shows the  
p-values of the cluster analysis (red points are significant points). I  
would be thankful if someone can give me some general explanation of these  
functions. Is it normal to see a high non-significant activity and low but  
significant activity based on the permutation cluster analysis?

Thank you,  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190502/9a76a83c/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190502/9a76a83c/attachment-0001.html)  
-------------- next part --------------  
A non-text attachment was scrubbed...  
Name: timefreq\_stat.png  
Type: image/png  
Size: 478930 bytes  
Desc: not available  
Url : [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190502/9a76a83c/attachment-0002.png](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190502/9a76a83c/attachment-0002.png)  
-------------- next part --------------  
A non-text attachment was scrubbed...  
Name: timefreq\_stat.png  
Type: image/png  
Size: 478930 bytes  
Desc: not available  
Url : [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190502/9a76a83c/attachment-0003.png](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190502/9a76a83c/attachment-0003.png)  
-------------- next part --------------  
A non-text attachment was scrubbed...  
Name: timefreq\_stat.py  
Type: text/x-python-script  
Size: 17750 bytes  
Desc: not available  
Url : [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190502/9a76a83c/attachment-0001.bin](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190502/9a76a83c/attachment-0001.bin)

---

<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:** [May 3, 2019, 5:02pm UTC](https://mne.discourse.group/t/cluster-analysis-for-time-frequency-data/1831/2 "2019-05-03T17:02:45Z")

</div>

External Email - Use Caution

hi,

Did you look at the statistics image that get thresholded ?

I doubt any of us has the time to edit your script to test it on a public  
dataset. Can you try to make a minimal example that uses a public  
dataset shared with MNE?

Alex

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution
> 
> Hi all,
> 
> I have used \*spatio\_temporal\_cluster\_1samp\_test\* on my  
> time-frequency data (power (EpochsTFR) with a shape:[epochs X chan X freqs  
> X time] ). I have read the cited paper (MarisOostenveld07) for the  
> permutation tests. However, it is still not clear to me what these  
> functions are exactly doing. I have confused about the cluster analysis  
> after seeing my plots. I have attached parts of my code and my results to  
> this email.  
> [image: timefreq\_stat.png]  
> The first row shows the power activities and the second row shows the  
> p-values of the cluster analysis (red points are significant points). I  
> would be thankful if someone can give me some general explanation of these  
> functions. Is it normal to see a high non-significant activity and low but  
> significant activity based on the permutation cluster analysis?
> 
> Thank you,
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> 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)

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190503/4105d6b7/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190503/4105d6b7/attachment-0001.html)  
-------------- next part --------------  
A non-text attachment was scrubbed...  
Name: timefreq\_stat.png  
Type: image/png  
Size: 478930 bytes  
Desc: not available  
Url : [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190503/4105d6b7/attachment-0001.png](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190503/4105d6b7/attachment-0001.png)

---

<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:** [May 3, 2019, 7:38pm UTC](https://mne.discourse.group/t/cluster-analysis-for-time-frequency-data/1831/3 "2019-05-03T19:38:24Z")

</div>

External Email - Use Caution

Hi Alex,

Thanks for the response. I have edited the code and used one of the public  
datasets (eegbci). The .py code has also been attached.

Thank you,  
-Mary
