Aphasia fMRI to FC Analysis using VAE
This demo uses a Variational Autoencoder (VAE) to analyze functional connectivity patterns in the brain and their relationship to demographic variables.
Dataset Information
By default, this uses the SreekarB/OSFData dataset from HuggingFace with the following variables:
- ID: Subject identifier
- wab_aq: Aphasia severity score
- age: Age of the subject
- mpo: Months post onset
- education: Years of education
- gender: Subject gender
- handedness: Subject handedness (ignored in the analysis)
8 64
100 5000
8 64
Accuracy Metrics
Run analysis to see reconstruction accuracy metrics here
Examples
| Data Source (HF Dataset ID or Local Directory) | Latent Dimensions | Number of Epochs | Batch Size | Use HuggingFace Dataset |
|---|
How this works
- Data Loading: The system downloads NIfTI files (P01_rs.nii format) from the SreekarB/OSFData dataset
- Preprocessing: The fMRI data is processed using the Power 264 atlas and converted to functional connectivity (FC) matrices
- VAE Training: A conditional VAE model learns the latent representation of brain connectivity
- Predictive Modeling: The system trains a Random Forest regressor on latent features to predict WAB-AQ scores (aphasia severity)
- Analysis: The system analyzes relationships between latent brain connectivity patterns and demographic variables
- Visualization: Results are displayed showing original FC, reconstructed FC, generated FC, and demographic correlations
Note: This app works with the SreekarB/OSFData dataset that contains NIfTI files and demographic information.