mne-connectivity icon indicating copy to clipboard operation
mne-connectivity copied to clipboard

Consolidation of methods with "indices" vs not

Open adam2392 opened this issue 4 years ago • 4 comments

Because some "connectivity" functions are defined as bivariate functions between two sets of signals, we can allow "indices" argument in various functions.

This should probably be well-documented as showing up as "nans" in a connectivity container?

adam2392 avatar Jun 23 '21 16:06 adam2392

Not sure I understand what you mean. Do you mean for specifying e.g. which channels or source points should be considered out of the full list a data set might have? That indeed would raise interesting questions for the output and for plotting.

britta-wstnr avatar Jun 24 '21 20:06 britta-wstnr

There are methods such as spectral_connectivity, where one can pass in indices = ([1, 2], [0]) for example where they only compute connectivity between node 1/0 and 2/0.

This raises issues for downstream storage in a container and plotting. The way I solve it is by keeping track of indices and keeping the rest as nans. This runs into "storage" concerns if the arrays are big enough. In general though I was thinking we should probably keep track of "what can take in this extra parameter" vs not.

adam2392 avatar Jun 24 '21 21:06 adam2392

The way I solve it is by keeping track of indices and keeping the rest as nans. This runs into "storage" concerns if the arrays are big enough.

sounds like a use case for scipy.sparse if memory turns out to be constrained

drammock avatar Jun 24 '21 21:06 drammock

envelope_correlation seems like a function we can also add "indices" for.

adam2392 avatar Jul 02 '21 04:07 adam2392