Closed agramfort closed 10 years ago
just in case I've coded up the estimation of Partial Directed Coherence and Direct Transfer Function using MVAR processes.
https://gist.github.com/agramfort/9875439
let me know if it ends up being useful.
could be worth comparing with https://github.com/SCoT-dev/SCoT/blob/master/scot/connectivity.py
Sorry for replying late on account of missing the notification.
I have not worked with MNE before, but I'm definitely interested in joining forces. After all, connectevity tools by themselves are only of limited usefulness. Interoperability with other tools is something I will have to work on sooner or later :)
@agramfort: Both our implementations of MVAR fitting and PDC/DTF estimation yield similar results. That ought to be a good sign.
I have not worked with MNE before, but I'm definitely interested in joining forces.
would be great !
After all, connectevity tools by themselves are only of limited usefulness. Interoperability with other tools is something I will have to work on sooner or later :)
and you could benefit from the MNE/Freesurfer machinery for source reconstruction, group realignment etc.
@agramfort: Both our implementations of MVAR fitting and PDC/DTF estimation yield similar results. That ought to be a good sign.
that's a good start :)
and you could benefit from the MNE/Freesurfer machinery for source reconstruction, group realignment etc.
Indeed. Serious source reconstruction will often be preferrable over the ICA flavored blind source separation that we currently have.
we have ICA too using sklearn
maybe be worth comparing our approaches to have the best of both worlds in Python
cf.
where a you in the world? can we see you in real life at HBM or Biomag this year?
Am I correct to assume ICA in MNE is used for pre-processing and artifact reduction?
Our current approach is to estimate connectivity between ICs, but it would be interesting to use cortical source activations obtained from MNE instead.
I am in Austria. Unfortunately, I won't be at HBM or Biomag; only at the Graz BCI Conference :)
Am I correct to assume ICA in MNE is used for pre-processing and artifact reduction?
yes
Our current approach is to estimate connectivity between ICs, but it would be interesting to use source activations obtained from MNE instead.
worth trying indeed.
I am in Austria. Unfortunately, I won't be at HBM or Biomag; only at the Graz BCI Conference :)
we might have money to fly you to Paris in June for the MNE sprint.
would you be interested in coming?
I think I might be interested. What is the MNE sprint about? Google has trouble finding that information...
https://mail.nmr.mgh.harvard.edu/pipermail//mne_analysis/2014-March/001982.html
https://github.com/mne-tools/mne-python/wiki/Coding-sprints
the topics need to be expanded / clarified based on people's interests
The topics sound rather vague yet, but meeting other developers in person seems like a great opportunity to get some code done and ensure compatibility between tools. The date is fine for me too. I'd only have to get the OK from my boss who might take some convincing :)
more in projects in :
https://github.com/mne-tools/mne-python/wiki/GSOC-Ideas
https://github.com/mne-tools/mne-python/pulls
and issues :)
Looks like there is quite a bunch of things to do. Is the sprint related to the GSOC?
If there are plans to work on connectivity, I'm sure I can help.
Looks like there is quite a bunch of things to do. Is the sprint related to the GSOC?
no but one student will be there and we might want to give him a hand
If there are plans to work on connectivity, I'm sure I can help
you make the plans. Ideally we work in pairs that's the only thing. update the page saying you want to work on connectivity and it's good
Improving the connectivity code could definitely be something we could work on during the sprint. Right now we only have pairwise measures with an implementation that is quite efficient in terms of memory consumption and processing speed. Figuring out a good way to include partial measures (PDC, etc.) will definitely be interesting :).
MNE currently estimates connectivity from spectral densities, right? I have no experience with that approach. However, I can contribute MVAR based connectivity estimation or an interface to SCoT.
Yes, it uses non-parameteric spectrum estimation using either windowed FFTs, DPSS multitaper, or Morlet wavelets (for time-frequency connectivity). All methods currently implemented are pairwise, i.e., the connectivity is estimated for each pair of nodes separately. We should start thinking how to best implement conditional methods (e.g. partial coherence). I think MVAR methods are well suited for this, but it would be nice to have MVAR also for pairwise methods.
Pairwise methods could be implemented with bivariate AR models, but I think that is not very efficient. Alternatively, spectra obtained from MVAR can serve as the basis for pairwise methods.
Here is a list of measures I have currently implemented: http://scot-dev.github.io/scot-doc/api/scot/scot.html#r1 Methods such as PLV or PLI should be straightforward.
I've hijacked the connectivity-spectrum example to do a quick proof-of-concept: https://gist.github.com/kazemakase/11159740
The mvar residuals are far from white, unless the model order is set insanely high. I'm still puzzling over that...
I guess I can close now
https://github.com/SCoT-dev/SCoT
might be worth looking into this to see if we can join forces
cc/ @kazemakase
both of our licenses are compatible.