This repository contains MATLAB code developed to explore whether EEG-derived spectral and network features can predict resting-state fMRI BOLD activity of interest from simultaneous EEG–fMRI recordings.
The project investigates mappings between EEG features and fMRI-derived RSN activity using linear regression models with structured regularization.
The repository is organized as a script-based research workflow rather than a standalone toolbox.
The full analysis space is defined in config.m. Key dimensions explored include:
- Multiple datasets and subject cohorts
- Resting-state acquisitions
- Wavelet-based or Welch-based spectral decomposition
- Frequency range: 1–30 Hz
- Band-limited and broadband power representations
Power-based features
- Linear combinations of band power
- Root-mean-square frequency (RMSF)
- Total power (TP)
Connectivity-based features
- Imaginary part of coherency (iCoh)
- Weighted phase-lag index (wPLI)
Computed from EEG functional connectivity matrices using functions from the Brain Connectivity Toolbox (BCT), including:
- Degree and strength
- Clustering coefficient
- Characteristic path length
- Global and local efficiency
- Betweenness centrality
- Thresholded and topologically filtered networks
- EEG features are convolved with hemodynamic response functions (HRFs)
- Canonical HRFs and delayed variants are supported
- HRFs are computed using SPM12
- Delay embedding is used to account for inter-subject variability
Two families of linear regression models:
- Elastic net regression, combining L1 and L2 penalties
- Group-sparse regression (L21 + L1 penalty), promoting structured sparsity across predefined feature groups (e.g., frequency bands or delays)
Models are evaluated using multiple cross-validation strategies, including temporally blocked and non-contiguous (autocorrelation-safe) splits, session-based training/testing, and one-class (group-level) model estimation.
- Prediction accuracy assessed via correlation and error-based metrics
- Model comparison across feature sets and regularization strategies
- Reliability analyses (e.g., ICC, split-half tests)
- Group-level statistics and topographic visualization of model weights
-
SPM12
Used for hemodynamic response function (HRF) computation. -
Brain Connectivity Toolbox (BCT)
Rubinov M, Sporns O (2010). Complex network measures of brain connectivity: Uses and interpretations.
NeuroImage, 52:1059–1069.
http://www.brain-connectivity-toolbox.netThe graph-theoretical functions included in this repository are taken from the BCT version dated 2016-01-16.
This codebase was developed in the scope of the following conference abstract:
Xavier, M., Esteves, I., Vourvopoulos, A., Fouto, A. R., Ruiz-Tagle, A., Gil-Gouveia, R., & Figueiredo, P.
Deriving an EEG model to predict the activity of the default mode network measured by fMRI.
ISMRM & SMRT Annual Meeting, 2021.