You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
ML4H Poster can be helpful for understanding data preprocessing, model, and performance of the project.
The recording of presentation by the author Neeraj Wagh can be found on slideslive.
The slides used during the presentation can be found here.
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:
# ....loop over all windows in dataset....# window data is 10-second preprocessed multi-channel timeseries (shape: n_channels x n_timepoints) containing all channels in ch_nameswindow_data=np.expand_dims(window_data, axis=0)
# ch_names are listed in EEGGraphDataset.pyforch_idx, chinenumerate(ch_names):
# number of channels is is len(ch_names), which is 8 in our case.spec_coh_values, _, _, _, _=mne.connectivity.spectral_connectivity(data=window_data, method='coh', indices=([ch_idx]*8, range(8)), sfreq=SAMPLING_FREQ,
fmin=1.0, fmax=40.0, faverage=True, verbose=False)
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.
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.