This repository contains the implementation of Group-Specific Discriminant Analysis (GSDA) and experiments from the GigaScience paper “Group-specific discriminant analysis enhances detection of sex differences in brain functional network lateralization” by Zhou et al. (2025).
The resting-state fMRI data from HCP [1] and GSP [2] is used in this study. Code for data preprocessing is available at /preprocess
. Processed data is available at Zenodo: [HCP], [GSP].
numpy>=1.24.3
pandas>=1.5.3
scipy>=1.10.1
scikit-learn>=1.2.2
pytorch>=2.0.0
yacs
pip install -r requirements.txt
Basic usage:
python main.py --cfg configs/demo-hcp.yaml
Please create more .yaml files for different random seeds and datasets.
We provide GSDA running demo through a cloud Jupyter notebook on . Note the number of repetition is limited for faster demonstrations. This demo takes 10-20 minutes to complete the training and testing process.
[1] Smith, S. M. et al. Resting-state fMRI in the human connectome project. NeuroImage 80, 144–168 (2013)
[2] Holmes, A. J. et al. Brain genomics superstruct project initial data release with structural, functional, and behavioral measures. Sci. Data 2, 1–16 (2015)
If you use this code in your research, please cite the following paper:
@article{zhou2025group,
title={Group-specific discriminant analysis enhances detection of sex differences in brain functional network lateralization},
author={Zhou, Shuo and Luo, Junhao and Jiang, Yaya and Wang, Haolin and Lu, Haiping and Gaolang, Gong},
journal={GigaScience},
year={2025},
publisher={Oxford University Press}
}