Skip to content

CLopez021/Multistep-Traffic-Forecasting-by-Dynamic-Graph-Convolution

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multistep Traffic Forecasting by Dynamic Graph Convolution: Interpretations of Real-Time Spatial Correlations

This is the open source Keras code of the proposed Dynamic Graph Convolutional Networks (DGCN), a multistep network-level traffic condition forecasting model that can capture and explicitly give understandable spatial correlations among road links.

An example of the dataset used in the article (RotCC2) can be downloaded here: https://drive.google.com/file/d/1UCWmA-vLp3LSu1IFSiwdVMXSvdfsVFf9/view?usp=sharing.

For more datasets please visit DittLab-TUD: https://dittlab.tudelft.nl/, or our online traffic dynamics visualization website: http://dittlab-apps.tudelft.nl/apps/app-ndw/home.jsp, or directly send an email to one of the author: [email protected]

The meta-description of the dataset is as follows. x_train is the observed speed, e_train is the input labels for scheduled sampling, y_train is labeld to be predicted, the same for test set:

x_train = Data['Speed_obs_train']
y_train = Data['Speed_pred_train']
e_train = Data['E_train']
x_test = Data['Speed_obs_test']
y_test = Data['Speed_pred_test']
e_test = Data['E_test']

To reproduce the results in the paper, please put the corresponding datasets in the "Datasets" file. A command-line parsed .py file will be added before 1st March.

archi

File strucuture

.
|-custom_models
  |-layers_keras.py                # custom keras layers and DGCN RNN cell
  |-model_keras.py                 # construct DGCN model
  |-math_utils.py                  # mathematical tools
|-pretrained                  # pre-trained models to reproduce the results in the paper
|-DGCRNN.ipynb                # train/test the model, visualize predictions
|-model_interpretation.ipynb  # interpret dynamic spatial correlations
|-utils_vis.py                # visulization tools

Requirements

  • scipy 0.19.0
  • numpy 1.12.1
  • h5py
  • statsmodels
  • tensorflow 1.14.0 or 1.15.0
  • keras 2.3.1 or 2.2.5
  • networkx 2.5.0 (for tracking attention distribution in a complex graph)

* for early versions of tensorflow and keras the modelcheckpoint may fail.

About

Multistep Traffic Forecasting by Dynamic Graph Convolution: Interpretations of Real-Time Spatial Correlations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 68.4%
  • Jupyter Notebook 31.6%