Before running the code, ensure that you have the required dependencies installed. The key libraries used in this project include:
- Python 3.x
- NumPy
- PyTorch
- TorchDiffeq
- Matplotlib
- NetworkX
- PIL (Python Imaging Library)
- Pandas
You can install the required libraries using the following command:
pip install -r requirements.txt
To run the training script, use the following command format:
python main.py --T <Terminal_Time> --sampled_time <Time_Sampling_Type> --baseline <Model_Type> --gpu <GPU_ID> --weight_decay <Weight_Decay> --lr <Learning_Rate> --sparse --niters <Number_of_Iterations> --dump --dataset <Dataset>
The following command trains the model using dataset f3
with specific hyperparameters:
python main.py --T 5 --sampled_time irregular --baseline BDG --gpu -1 --weight_decay 1e-3 --lr 0.01 --sparse --niters 1500 --dump --dataset f3
--T
: Terminal time (the length of the time interval for the dynamics).--sampled_time
: Time sampling method, options includeirregular
orequal
.--baseline
: The baseline model to use for training (e.g.,BDG
).--gpu
: The GPU ID to use for training. Use-1
for CPU.--weight_decay
: The L2 regularization weight for the optimizer.--lr
: Learning rate for the optimizer.--sparse
: Use sparse matrices for the adjacency matrix (optional).--niters
: Number of iterations (epochs) for training.--dump
: Save the training results in the results directory (optional).--dataset
: Dataset selection. Options aref1
,f2
, andf3
.
If the --dump
option is used, the results will be saved in the results/cognitive/
directory.
GoogleDrive:https://drive.google.com/file/d/11Vh3IK6VIlNUKgmbQkXQwVmVti8EXuhm/view?usp=drive_link