mne-tools / mne-connectivity

Connectivity algorithms that leverage the MNE-Python API.
https://mne.tools/mne-connectivity/dev/index.html
BSD 3-Clause "New" or "Revised" License
66 stars 34 forks source link

Regarding interpretation of spectral measures #66

Closed Div12345 closed 2 years ago

Div12345 commented 2 years ago

Hi, I had a query on this in the documentation for spectral connectivity measures documentation link -

These measures are not to be interpreted over time. Each Epoch passed into the dataset is interpreted as an independent sample of the same connectivity structure. Within each Epoch, it is assumed that the spectral measure is stationary. The spectral measures implemented in this function are computed across Epochs. Thus, spectral measures computed with only one Epoch will result in errorful values.

From the source, the way I understand it, the connectivity is being calculated per epoch using _epoch_spectral_connectivity. In the compute_con of all the estimators as well, there will be no issue if n_epochs=1. Rather than the expectancy across multiple epochs, it will be for just a single epoch across channels.

In this sense, I'm not sure about the meaning of the last line in the doc which says that computation with a single epoch will result in errorful values?

adam2392 commented 2 years ago

Hi @Div12345 that is correct. Those methods (and for the most part all the current implementation in mne-connectivity) assume each Epoch is a sample from the same connectivity structure. That is they specifically try to estimate one connectivity structure from many Epochs.

That is, these are connectivity over trials. See: https://www.youtube.com/watch?v=UNj6f_4b8lU.

However, in #67, connectivity over time will be introduced. Now, each Epoch is treated as a separate connectivity structure to be estimated.

Div12345 commented 2 years ago

Alright, after seeing #26 and the PRs, I now understand what that meant. Thanks!