guoshnBJTU/ASTGCN-2019-pytorch
关于
基于注意力机制的时空图卷积网络,用于交通流量预测;AAAI 2019,PyTorch 版本
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文ASTGCN
Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting (ASTGCN)

This is a Pytorch implementation of ASTGCN and MSTCGN. The pytorch version of ASTGCN released here only consists of the recent component, since the other two components have the same network architecture.
Reference
@inproceedings{guo2019attention,
title={Attention based spatial-temporal graph convolutional networks for traffic flow forecasting},
author={Guo, Shengnan and Lin, Youfang and Feng, Ning and Song, Chao and Wan, Huaiyu},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={33},
pages={922--929},
year={2019}
}
Configuration
Step 1: The loss function and metrics can be set in the configuration file in ./configurations
Step 2: The last three lines of the configuration file are as follows:
loss_function = masked_mae
metric_method = mask
missing_value = 0.0
loss_function can choose 'masked_mae', 'masked_mse', 'mae', 'mse'. The loss function with a mask does not consider missing values.
metric_method can choose 'mask', 'unmask'. The metric with a mask does not evaluate missing values.
The missing_value is the missing identification, whose default value is 0.0
Datasets
Step 1: Download PEMS04 and PEMS08 datasets provided by ASTGNN.
Step 2: Process dataset
on PEMS04 dataset
python prepareData.py --config configurations/PEMS04_astgcn.confon PEMS08 dataset
python prepareData.py --config configurations/PEMS08_astgcn.conf
Train and Test
on PEMS04 dataset
python train_ASTGCN_r.py --config configurations/PEMS04_astgcn.confon PEMS08 dataset
python train_ASTGCN_r.py --config configurations/PEMS08_astgcn.conf
探索相关项目
加载中…