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.
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.
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
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.
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