DSTAGNN: Dynamic Spatial-Temporal Aware Graph Neural Network for Traffic Flow Forecasting
DSTAGNN: Dynamic Spatial-Temporal Aware Graph Neural Network for Traffic Flow Forecasting, Proceedings of the 39th International Conference on Machine Learning, PMLR 162:11906-11917. (ICML 2022)
Paper is availabe at https://proceedings.mlr.press/v162/lan22a/lan22a.pdf
Step 1: DSTAGNN is implemented on those several public traffic datasets.
p72z
and uncompress data file usingtar -zxvf data.tar.gz
Step 2: Process dataset
on PEMS03 dataset
python prepareData.py --config configurations/PEMS03_dstagnn.conf
on PEMS04 dataset
python prepareData.py --config configurations/PEMS04_dstagnn.conf
on PEMS07 dataset
python prepareData.py --config configurations/PEMS07_dstagnn.conf
on PEMS08 dataset
python prepareData.py --config configurations/PEMS08_dstagnn.conf
If traffic data is available, its aware grap could also be generated by code:
cd ./data/
python STAG_gen.py
The shape of input traffic data should be "(Total_Time_Steps, Node_Number). For example, in PEMS08 dataset, it has 170 roads and 62 days data. Thus its shape is (62*288, 170).
The calculation uses CPU, which should be prepared for enough computation resources.
on PEMS03 dataset
python train_DSTAGNN.py --config configurations/PEMS03_dstagnn.conf
on PEMS04 dataset
python train_DSTAGNN.py --config configurations/PEMS04_dstagnn.conf
on PEMS07 dataset
python train_DSTAGNN.py --config configurations/PEMS07_dstagnn.conf
on PEMS08 dataset
python train_DSTAGNN.py --config configurations/PEMS08_dstagnn.conf
visualize training progress:
tensorboard --logdir logs --port 6006
then open http://127.0.0.1:6006 to visualize the training process.
The configuration file config.conf contains two parts: Data, Training: