Code for the paper "Towards Optimising EEG Decoding using Post-hoc Explanations and Domain Knowledge", EMBC 2024
Use requirements.txt with Python 3.7 or higher
Dataset: To skip the pre-processing step to generate epoch data, you may refer to this repo for the dataset.
To use Conformer architecture with 3 conditions:
- Train the model using all channel data
- Using MI relevant data
- Using feature relevance refer to the file Conformer_top_16_subs.ipynb. Change the class EEGMMIDTrSet and EEGMMIDTsSet to ensure the correct choice of channels.
extractResults.ipynb helps extract the model performance and save the results in .csv format
Notebooks GradCAM_MIchannels.ipynb helps generate feature relevance explanations in the form of topomaps and TF plots as visualised in the paper.