Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting (ASTGCN)
We validate our model on two highway traffic datasets PeMSD4 and PeMSD8 from California. The datasets are collected by the Caltrans Performance Measurement System (PeMS) (Chen et al., 2001) in real time every 30 seconds. The traffic data are aggregated into every 5-minute interval from the raw data. The system has more than 39,000 detectors deployed on the highway in the major metropolitan areas in California. Geographic information about the sensor stations are recorded in the datasets. There are three kinds of traffic measurements considered in our experiments, including total flow, average speed, and average occupancy.
We provide two dataset: PEMS-04, PEMS-08
PEMS-04:
307 detectors
Jan to Feb in 2018
3 features: flow, occupy, speed.
PEMS-08:
170 detectors
July to Augest in 2016
3 features: flow, occupy, speed.
To install MXNet correctly, you should follow the instruction provided by this page.
To run mxboard, you have to install tensorboard.
Other dependencies can be installed using the following command:
pip install -r requirements.txt
If you are using docker, install nvidia-docker and run the commands below:
# build image
docker build -t astgcn/mxnet:1.4.1_cu100_mkl_py35 -f docker/Dockerfile .
# training model in background
docker run -d -it --rm --runtime=nvidia -v $PWD:/mxnet --name astgcn astgcn/mxnet:1.4.1_cu100_mkl_py35 python3 train.py --config configurations/PEMS04.conf --force True
train model on PEMS04:
python train.py --config configurations/PEMS04.conf --force True
train model on PEMS08:
python train.py --config configurations/PEMS08.conf --force True
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 three parts: Data, Training and Predict:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。