Skip to content

GEC directionality interpretation #95

@davidaquilue

Description

@davidaquilue

Hello,

I have been working on determining how GEC's asymmetry can be leveraged in the context of Alzheimer's Disease. I have been testing out neuronumba's implementation and the pipeline is quite useful.

Just wanted to mention that the way the code is set up in .../src/neuronumba/observables/lagged_cov.py, with

@staticmethod
def _calc_COV_emp(tss: np.ndarray, timelag: int = 1):
     """
     Parameters
     ----------
     tss : non-perturbed timeseries, in format (n_roi, n_timesteps)
     timelag : the number of timesteps of your timelag, default = 1

     Returns
     -------
     time-lagged cov matrix in format(n_roi, n_roi)
     """
     n_roi = tss.shape[0]
     EC = np.zeros((n_roi, n_roi))
     for i in range(n_roi):
         for j in range(n_roi):
             correlation = signal.correlate(tss[i, :] - tss[i, :].mean(), tss[j, :] - tss[j, :].mean(), mode='full')
             lags = signal.correlation_lags(tss[i, :].shape[0], tss[j, :].shape[0], mode='full')
             EC[i, j] = correlation[lags == timelag] / tss.shape[1]
     return EC

as a consequence of how signal.correlate works, returns a shifted covariance matrix whose {i,j}-th element answers the following question: How does signal j predict i.

I am unsure whether this is the desired output. I would assume that the expected nature of GEC_{i,j} is how dynamic's in node i affect node j, which would make use of the transposed output from the _calc_COV_emp() funciton.

Would love to hear your input and whether this has already been discussed previously.

Salut!

David

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions