DGL Implementation of EEG-GCNN Paper
This example is a simplified version that presents how to utilize the original EEG-GCNN model proposed in the paper EEG-GCNN, implemented with DGL library. The example removes cross validation and optimal decision boundary that are used in the original code. The performance stats are slightly different from what is present in the paper. The original code is here.
All References
Dependencies
- Python 3.8.1
- PyTorch 1.7.0
- DGL 0.6.1
- numpy 1.20.2
- Sklearn 0.24.2
- pandas 1.2.4
Dataset
- Final Models, Pre-computed Features, Training Metadata can be downloaded through FigShare.
- In
EEGGraphDataset.py, we specify the channels and electrodes and use precomputed spectral coherence values to compute the edge weights. To use this example in your own advantage, please specify your channels and electrodes in __init__ function of EEGGraphDataset.py.
- To generate spectral coherence values, please refer to spectral_connectivity function in mne library. An example usage may take the following form:
How to Run
- First, download
figshare_upload/master_metadata_index.csv, figshare_upload/psd_features_data_X, figshare_upload/labels_y, figshare_upload/psd_shallow_eeg-gcnn/spec_coh_values.npy, and figshare_upload/psd_shallow_eeg-gcnn/standard_1010.tsv.txt. Put them in the repo.
- You may download these files by running:
- You will need to unzip the downloaded file.
- Then run:
- The default model used is
shallow_EEGGraphConvNet.py. To use deep_EEGGraphConvNet.py, run:
- After the code executes, you will be able to see similar stats in performance section printed. The code will save the trained model from every epoch.
Performance
| DGL |
AUC |
Bal. Accuracy |
| Shallow EEG-GCNN |
0.832 |
0.750 |
| Deep EEG-GCNN |
0.830 |
0.736 |
| Shallow_EEGGraphConvNet |
AUC |
Bal.Accuracy |
 |
 |
 |
| Deep_EEGGraphConvNet |
AUC |
Bal.Accuracy |
 |
 |
 |
Contact
Citation
Wagh, N. & Varatharajah, Y.. (2020). EEG-GCNN: Augmenting Electroencephalogram-based Neurological Disease Diagnosis using a Domain-guided Graph Convolutional Neural Network. Proceedings of the Machine Learning for Health NeurIPS Workshop, in PMLR 136:367-378 Available from http://proceedings.mlr.press/v136/wagh20a.html.