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
68 stars 34 forks source link

Adding AR model / linear system over sliding windows as a time-varying connectivity method #7

Closed adam2392 closed 3 years ago

adam2392 commented 3 years ago

As mentioned in the original GSoC proposal and also in MNE-Python, this would be a fit to the data using the model:

x(t+1) = Ax(t)

over small time windows. This is a generative model and so can be accompanied by a tutorial showing "reconstruction" of the ieeg data.

agramfort commented 3 years ago

Don’t write this code from scratch

Use existing code for fitting MVAR models

adam2392 commented 3 years ago

I think the best existing code could be maybe sklearns multivariate linear regression code?

agramfort commented 3 years ago

no. sklearn is not a time series package.

you have https://www.statsmodels.org/dev/vector_ar.html and https://github.com/scot-dev/scot/blob/master/scot/var.py

ping @cbrnr

cbrnr commented 3 years ago

SCoT has all the basic time-varying AR estimation set up. I haven't had time to work on it in the past years, but it is a great package and supports many connectivity measures based on AR coefficients. I'd be happy if we found a way to revive the package, which could even mean transferring it to a new repo and then extending/adapting/updating the code base (it is MIT licensed so there's no problem).

agramfort commented 3 years ago

yes +100 to integrate SCoT into mne-connectivity