Official PyTorch implementation of PA2MGCN :Patch Attention Based Adaptive Multi-Head Graph Convolutional Networks for Traffic Flow Forecasting.
We recommend using Conda.
conda create -n PA2MGCN python=3.9 -y
conda activate PA2MGCNpip install -r requirements.txtSupported traffic datasets include:
METR-LAPeMS-BayPEMS04PEMS08
Download link:
For the SD dataset source, please refer to: LargeST
⚠️ Note for SD data conversionYou need to modify LargeST's original SD data generation code first. By default, LargeST saves
his.npzwith z-score normalized flow values. PA2MGCN applies its own normalization internally, so using that file directly will cause double normalization. Remove the standardization step from LargeST's save pipeline before converting the SD dataset for PA2MGCN.
Place dataset files under datasets/ with a structure similar to:
PA2MGCN/
├── datasets/
│ ├── METR-LA/
│ ├── PeMS-Bay/
│ ├── PEMS04/
│ ├── PEMS08/
│ └── SD/
├── scripts/
└── ...
The project provides training scripts in scripts/.
Run commands:
chmod 776 ./scripts/train.sh
./scripts/train.shPaper information is coming soon.
