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

Add support for additional multivariate methods #155

Open
tsbinns opened this issue Nov 6, 2023 · 7 comments
Open

Add support for additional multivariate methods #155

tsbinns opened this issue Nov 6, 2023 · 7 comments

Comments

@tsbinns
Copy link
Collaborator

tsbinns commented Nov 6, 2023

Now that a general framework for multivariate connectivity is supported following #125 and #142, it would be nice to expand the methods available. Three come to mind:

1. Canonical coherence (multivariate coherence)

Paper: Vidaurre et al. (2019)

This shares many principles with the methods based on the imaginary part of coherency (MIC & MIM) which have already been implemented, but is a more appropriate method for cases where you want to find the relationship between datasets where e.g. volume conduction is not expected to be an issue.

The example they give in the paper looks at EEG and EMG data, however it can also be applied to brain recordings from different modalities (e.g. EEG and subcortical LFP).

Possible challenges?

I do not anticipate any hurdles adding this method (i.e. requires no further API changes, works completely with the multivariate framework currently implemented, tests and examples would be similar to those for MIC).

Our group has the method written up in Python and we have started implementing it with MNE-Connectivity, but I cannot say for sure when we would have a PR available to review this in more detail.

2. Multivariate phase slope index

Paper: Basti et al. (2018)

Adding this was raised back in #102. There is now a multivariate measure of directed connectivity implemented with Granger causality, however PSI is of course a different method.

Possible challenges?

The equations for computing MPSI are pretty simple, so coding this up would not be a problem. I also don't see any problems integrating with the multivariate framework.

The only thing which comes to mind is the fact that PSI involes summing over frequencies. The fmin and fmax arguments could be used to specify the frequency bands over which the results are summed, or the frequency-resolved results could be returned and the end-user could sum over the frequency bands of interest afterwards. Nothing impossible, but worth keeping in mind.

3. Conditional Granger causality

Paper: Barnett & Seth (2015)

Currently, the GC method implemented is unconditional, i.e. accounts for information flow from a group of signals, X, to another group, Y. In contrast, conditional GC accounts for information flow from X to Y conditional on a third group of signals, Z. This is useful if you want to characterise information flow between several groups of signals, e.g. as in Liao et al. (2010).

Possible challenges?

A form of conditional GC exists which is based on the same state-space approach as for the unconditional GC which is currently implemented, so adding the code for this method would not be too much trouble (much of the existing GC code can be used).

What would be trickier is how to index this third set of conditional channels. This could require some API changes, e.g. a new argument cond_indices in spectral_connectivity_epochs and spectral_connectivity_time. Again nothing impossible, but would require some discussion.

Summary

Overall, canonical coherence is the easiest method to add (and the one we would be closest to opening a PR for), but I think the other two are still worth considering.

Very open to comments on these proposals, or if anyone has suggestions for other multivariate methods which should be considered.
Cheers!

@larsoner
Copy link
Member

larsoner commented Nov 6, 2023

Not opposed to adding any of these, just a general comment that anything we add is something that we need the time and expertise to support and fix bugs for. So I'd caution against trying to add everything we can and instead focus on things that people need to have for their workflows. But maybe you need all of these already @tsbinns ?

@tsbinns
Copy link
Collaborator Author

tsbinns commented Nov 6, 2023

@larsoner, of course, I understand.

Canonical coherence is something myself and a number of other people in my group would definitely find useful, hence why we already started looking into this.

Conditional GC would complement the current GC method nicely, but it is not something I have an immediate use for, so it would not be my priority for coding up.

MPSI I included just because there was an open issue. Personally I do not need this.

As discussed with @adam2392 before, I'm also happy to lend a hand in case any problems with these methods arise for the foreseeable future!

@drammock
Copy link
Member

drammock commented Nov 6, 2023

@ruuskas do you have any input here as to which multivariate methods should be prioritized?

@agramfort
Copy link
Member

@neurointell you need to understand that the tools you use here are written by academic engineers, phd students, post-doc and professors who allocate a fraction of their time to build an open source ecosystem for better research and science. If you think that the tools is not great enough, then help us to make it better by also giving a fraction of your time to the community.

@agramfort
Copy link
Member

agramfort commented Jan 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@agramfort @drammock @larsoner @tsbinns and others