- Python 3.9
conda create -n atdgnn python=3.9
conda activate atdgnn
pip3 install -r requirements.txt
python main.py
You can set the parameters in main.py
to run the code. You can also use flags to set the parameters. The parameters used in our paper are listed in the params file.
python main.py --label 'V'
If you want to run the code with the DEAP dataset, you must set these parameters as follows:
python main.py --dataset 'DEAP' --sampling-rate=128 --target-rate=128 --trial-duration=63 --input-shape '1, 32, 512'
For other parameters, you can refer to the params file.
If you want to run the code with the MEEG dataset, you must set these parameters as follows:
python main.py --dataset 'MEEG' --sampling-rate=1000 --target-rate=200 --trial-duration=59 --input-shape '1, 32, 800'
For other parameters, you can refer to the params file.
- Clone our code.
git clone https://github.com/xmh1011/AT-DGNN.git cd AT-DGNN
- Unzip the data file.
cd example tar -xvzf s01.tar.gz tar -xvzf sample_1.tar.gz
example/sample_1.dat
is subject 1 of MEEG dataset. example/s01.dat
is subject 1 of DEAP dataset.
After unzipping the sample data, you can run the code as follows.
example/sample_1.dat
is subject 1 of MEEG dataset.
You can run as follows:
python main.py --data-path './example' --dataset 'MEEG' --sampling-rate=1000 --target-rate=200 --trial-duration=59 --input-shape '1,32,800' --subjects=1 --model 'AT-DGNN'
example/s01.dat
is subject 1 of DEAP dataset.
You can run as follows:
python main.py --data-path './example' --dataset 'DEAP' --sampling-rate=128 --target-rate=128 --trial-duration=63 --input-shape '1,32,512' --subjects=1 --model 'AT-DGNN'
If you want to reproduce the results in our paper, you can download the dataset. After downloading the dataset, you can run the code as mentioned above.