spectral_connectivity function in MNE Python Library

External Email - Use Caution

Hi all,

I am using MNE library for cross confirming my results on connectivity.
While using the library I noticed something peculiar. When I provide data
with more than one epoch the spectral_connectivity function seems to work
fine. But, when the data with only one epoch is provided, I get the
connectivity matrix with all one in the lower triangle. I am unable to
comprehend the issue. Please help me with this.

For your reference I am providing the modified example taken from the
website only.

Looking eagerly for your reply.

Thanks,
Sudhakar Mishra
Research Scholar
IIIT-Allahabad
Website <https://modelingemotion.wixsite.com/emotion>

Is the nothingness lack of differentiation?
*??? ??? ??? ? ??? ??? ??? ???
??? ?*
*??? ??? ??? ??? ??? ??? ???
???*
*???*
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200208/a0116dc8/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed…
Name: plot_sensor_connectivity.py
Type: text/x-python
Size: 2092 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200208/a0116dc8/attachment.py

External Email - Use Caution

Hi Sudhakar,

what you experience is expected as the spectral connectivity metrics implemented in that function are defined as statistics across epochs/trials.
See notes here: https://mne.tools/stable/generated/mne.connectivity.spectral_connectivity.html

We should probably include a warning or even throw an error in when a single epoch is passed.
I?d be even careful when using only few epochs.
You need data to estimate these metrics.

Hope that helps,
Denis

External Email - Use Caution

Hi Denis and Sudhakar,

This is an interesting point. Sudhakar, depending on which spectral connectivity method you are using, you can pass it a single epoch as a list of length 1, i.e. [epoch], to get a matrix of values.

Denis, several of these connectivity methods have been used to meaningful effect on single epochs of resting state data (see, for example, Englot et al., Brain, 2016, using imaginary coherence). Is there something specific about MNE?s implementation that would make it less reliable for resting state data calculations, or is this more a debate of the utility of resting state information in the first place?

FWIW, I would favor throwing a warning rather than an error since people (myself included) might intentionally use a single epoch if there isn?t some reason why MNE?s implementation is different from others.

Thanks,
Josh

Joshua Bear, MD, MA | Assistant Professor, Pediatric Neurology and Epilepsy
University of Colorado and Children?s Hospital Colorado
13123 East 16th Avenue, Box B-155 | Aurora, CO 80045 | Phone: 720-777-6138 | Fax: 720-777-7285

External Email - Use Caution

Hi,

I think there are two things going on here.

Our function does support resting-state analysis by considering equally spaced peudo-epochs with or without overlap.
But computing a value for one single trial is not implemented by our function as it is now.
The averaging implied in the expectations that you find in the notations inside the documentation is indeed phase-locking across epochs,
not averaging across time.
To support a variant that gives you meaningful outputs in single-epoch mode, e.g., slimilar to a single-trial correlation or covariance matrix, the could would need to be extended.
It's perhaps worthwhile to open a related issue on github.

Denis

External Email - Use Caution

That makes sense. Thank you for those clarifications!

Best,
Josh

Joshua Bear, MD, MA | Assistant Professor, Pediatric Neurology and Epilepsy
University of Colorado and Children?s Hospital Colorado
13123 East 16th Avenue, Box B-155 | Aurora, CO 80045 | Phone: 720-777-6138 | Fax: 720-777-7285