Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding cross frequency coupling connectivity measure #75

Open
Div12345 opened this issue Jan 21, 2022 · 7 comments
Open

Adding cross frequency coupling connectivity measure #75

Div12345 opened this issue Jan 21, 2022 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Div12345
Copy link

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

@agramfort
Copy link
Member

agramfort commented Jan 22, 2022 via email

@adam2392
Copy link
Member

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

@Div12345
Copy link
Author

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

@adam2392
Copy link
Member

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

@agramfort
Copy link
Member

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

@TomDLT
Copy link

TomDLT commented Jan 24, 2022

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.

@adam2392
Copy link
Member

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 adam2392 added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants