gsp-eeg / EEGraSP

EEG signal analysis based on graph signal processing
https://eegrasp.readthedocs.io/
MIT License
0 stars 0 forks source link

Test Signal Smoothness and prediction error for ERP vs Single Trial interpolation #11

Open lucaslanek opened 5 months ago

lucaslanek commented 5 months ago

In GitLab by @julioRodino on Apr 30, 2024, 15:39

When interpolating an EEG, the question about at what level it should be interpolated to produce better results is non-trivial. If we assume that the signal comes from a graph, $\mathcal{G}$, with N vertices, $\mathcal{V}$ and M edges, $\mathcal{E}$. The better prediction for $x_{i}$, that is, the signal value from node $i$ with $i \in \mathcal{V}$, should correspond to the combination of Graph and signal with lowest variance. In Graph Signal Processing, a graph's variance can be calculated through the normalized total variation, $TV$, defined as:

TV_g = \frac{1}{\sum_i{|(x(v_i)|}}\sum_{i\sim j}a_{ij}|x(v_i)-x(v_j)|, 

The sum is performed over all pairs of nodes i and j that are connected, $a_{ij} \neq 0$. In the case of an EEG signal, x corresponds to a vector with the channel values.

Moreover, using a one-hop operator, an a a priori prediction error, $z(i)$, can be computed using the weighted average of the neighbors signal for all nodes. Evaluating the prediction error of the interpolation, given a graph, the normalized version of the prediction errors takes into account the node degree of each node, giving more weight to errors of nodes with more neighbors.

z'(i) = x(i) - \sum_{j \in \mathcal{N}(i)} \frac{a_{ij}}{\sqrt{d_i}\sqrt{d{j}}}x(j),

Or in matrix notation:

z' = \mathcal{L}x,

Where $\mathcal{L}$ is the symetric normalized Laplacian of the graph, $\mathcal{G}$.

Both of these can be computed as a way to test how well we could learn the graph accommodates to the signal and the prediction of error for a set of electrodes.

A

Reference:

Ortega, A. (2022). Introduction to Graph Signal Processing (1st ed.). Cambridge University Press. https://doi.org/10.1017/9781108552349

lucaslanek commented 5 months ago

In GitLab by @julioRodino on Apr 30, 2024, 15:47

added #12 as child task

lucaslanek commented 5 months ago

In GitLab by @julioRodino on Apr 30, 2024, 15:47

added #13 as child task