mne-connectivity icon indicating copy to clipboard operation
mne-connectivity copied to clipboard

Adding cross frequency coupling connectivity measure

Open Div12345 opened this issue 3 years ago • 7 comments
trafficstars

Describe the problem

Adding cross-frequency coupling as a connectivity measure. Between channels for single epoch type.

Describe your solution

Found this while searching for existing implementations - https://github.com/mne-tools/mne-sandbox/blob/master/examples/connectivity/plot_pac.py

Div12345 avatar Jan 21 '22 16:01 Div12345

have a look at https://pactools.github.io

Message ID: @.***>

agramfort avatar Jan 22 '22 13:01 agramfort

@Div12345 this looks good to me because it's a time-resolved measure. Pactools looks like it hasn't been updated since 2020.

I think PAC implementation and an accompanying example would be an awesome feature to add.

adam2392 avatar Jan 24 '22 15:01 adam2392

@adam2392 So by PAC implementation you mean adapting it to this codebase format and integrating it here or as a dependency?

Div12345 avatar Jan 24 '22 16:01 Div12345

I would lean towards integrating it here instead of as a dependency since pac tools isn't maintained.

adam2392 avatar Jan 24 '22 16:01 adam2392

ping @TomDLT who might be interested in giving a hand here

agramfort avatar Jan 24 '22 17:01 agramfort

Pactools is not actively maintained because I don't work on these topics anymore, but everything should still work fine. Feel free to take part of it to MNE and credit pactools. I won't have time to do the integration myself, but I can help on the discussion.

Implementing a simple PAC metric as in [Penny et al 2008] or [Tort et al 2010] should be straightforward. However, most PAC metrics suffer from the same issue, which is that one cannot validate the metric on a separate test set. This issue makes most PAC metrics arbitrary/overfitting, because parameters cannot be cross-validated. One of the few metrics that can be cross-validated is the one described in [Dupre la Tour et al 2017] (disclaimer: I am the first author). This metric is also more robust, and allows to disentangle phase shifts from time differences. However, this metric relies on DAR models which would be less straightforward to integrate into MNE. (Another metric with similar properties is described in [Soulat et al 2019], which has a unique potential to model non-sinusoidal oscillations (!), but I don't know if there is an open-source implementation.) One option could be to integrate some simple PAC metrics (maybe [Penny et al 2008] and [Tort et al 2010]), and have an optional dependency to pactools for other metrics.

TomDLT avatar Jan 24 '22 18:01 TomDLT

Implementing a simple PAC metric as in [Penny et al 2008] or [Tort et al 2010] should be straightforward. However, most PAC metrics suffer from the same issue, which is that one cannot validate the metric on a separate test set. This issue makes most PAC metrics arbitrary/overfitting, because parameters cannot be cross-validated. One of the few metrics that can be cross-validated is the one described in [Dupre la Tour et al 2017] (disclaimer: I am the first author). This metric is also more robust, and allows to disentangle phase shifts from time differences. However, this metric relies on DAR models which would be less straightforward to integrate into MNE. (Another metric with similar properties is described in [Soulat et al 2019], which has a unique potential to model non-sinusoidal oscillations (!), but I don't know if there is an open-source implementation.) One option could be to integrate some simple PAC metrics (maybe [Penny & al 2008] and [Tort & al 2010]), and have an optional dependency to pactools for other metrics.

@Div12345 seems like we could approach this in two steps: 1) integrate two simple PAC algorithms referenced here and then 2) add the third algorithm that simply wraps PACtools as a soft dependency for now.

adam2392 avatar Jan 26 '22 22:01 adam2392