# ASTGCN
Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting (ASTGCN)
<img src="fig/ASTGCN architecture.png" alt="image-20200103164326338" style="zoom:50%;" />
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
```latex
@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:
```c++
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](https://github.com/guoshnBJTU/ASTGNN/tree/main/data).
Step 2: Process dataset
- on PEMS04 dataset
```shell
python prepareData.py --config configurations/PEMS04_astgcn.conf
```
- on PEMS08 dataset
```shell
python prepareData.py --config configurations/PEMS08_astgcn.conf
```
# Train and Test
- on PEMS04 dataset
```shell
python train_ASTGCN_r.py --config configurations/PEMS04_astgcn.conf
```
- on PEMS08 dataset
```shell
python train_ASTGCN_r.py --config configurations/PEMS08_astgcn.conf
```
没有合适的资源?快使用搜索试试~ 我知道了~
ASTGCN-中的代码---1个Feature
共141个文件
sample:13个
pyc:9个
py:8个
需积分: 9 0 下载量 183 浏览量
2022-06-27
14:57:17
上传
评论
收藏 818.69MB ZIP 举报
温馨提示
因为data资源太大,分开上传的
资源详情
资源评论
资源推荐
收起资源包目录
ASTGCN-中的代码---1个Feature (141个子文件)
04a1366aba664c04edaa7b6e2e478ed00736ba 4KB
0509e1e30d8719cbb386e4dc1bb1a0514e78a2 656KB
05428ba1be7dcb737de46da905f7244f6e2f0c 656KB
055a895bf346495d817a44a6509901bcd239a1 657KB
068dcde5b661cfcf64e626badaf969dbc364e6 43.12MB
090c83974e3df1cd75bd38cc4cf7840af5b07c 654KB
09f9d5b1cc205a84f88bc1b644c2bace3427cd 5KB
0a87e3039e98a4b7c685481f9c7e9ee7849962 201B
0bb3407ca01ccb8fff0067bde0dc0d68350f15 656KB
1264cae7cf49e8311e86296f565771ea8c792d 112B
158256d70b190ca89b6ef15bb051fda0f916bc 5KB
186a343224fd8e77c9402d576622b3d3d70698 656KB
187eba8f9e5c5e13cd27cee3c300c15347557f 657KB
2a7e99a083d54f74dc5fe3ef3c92f7dbba35b8 657KB
3921884b59048641d2269454d0b3d55b63bb88 656KB
3c7880aa570ce807907de3f727bd10bb3d86e4 140B
3e3d01a8dfe8f6e80a2e6e635e2a3101960b65 648KB
3e7ec134fd4f1ab6ae1f3eba93ab87d044d286 656KB
44878a60b4aa9f0806053dcf95844c9151be6a 230B
4ac7899af7d2b81498ba555728b6192332588c 77B
4b6b7f2e95f81fd82a9aacdfb0957dbb4738fe 5KB
510008e3010f278812767594d5cd7268a0c0b9 656KB
568efd44eb15cc3437b74df81babfa3de48f48 123B
57b38facd5fcd20bd1b8fbd8b18f6beeac4d1e 657KB
5f898f5b76ffdb5ffa4959020939aa65e7b375 657KB
5f9ccdee86bdcda741d502719ea382ebbce19c 657KB
64c0503c6a1462846a551ed67dcfd225d41694 249.09MB
652a8fcc08c6bdd536bcb390e1e12b1c2f232f 953B
67afaf186bf85c3cf58f2e7c6b1a72770723c9 3KB
6ba96c64456c5bad3846d43b1fc8633b97a6cf 654KB
6ce884da53fb2738ed209ad742486c645fcb11 106B
70cf378f7c534d4f1564544f0c0d9c29807bd6 4KB
71be6a82da474ba0ad358197b54a0401fe757c 2KB
72291eb9117f02bffead2032eb75cdc02567a1 657KB
764ab062cc1684d94f7a949943d7b1d187a5be 657KB
7a8b5a59c92c84961e55ec470c9a42707e3a90 788B
7b9897da431d52951078c98e5cddc35e142dd2 179B
8049a36d10ceae66456b5f4df5bc97e21ab0a1 77B
8371d93bf488149f49a338cd9002c13d149a19 64B
8a4c5518c755ff60ac695ea19d5c4281def372 1010B
8fa5558cf9b1ea8806abf05948ce8d75409cf3 77B
97dbfd411b72c52e91fafe3bde3db0ee26dddc 6KB
98655cd55b83ed76425650a04330966983b325 656KB
9c08c497c80b9e277dfe451f5595090ea6e10a 918B
9c4b9e3b0fdf5866974f4b6164deede89c8e15 657KB
9cd6d05da17095f0a59760a56999ff3228c1ba 343B
9de29bb2d1d6434b8b29ae775ad8c2e48c5391 15B
9e595971cf3d68d11ff29c4cca3b6898a71e20 74B
a39eac4b86963b1ac22874fd1cc693eb642cd2 31.09MB
a50e45380fcf7ecbc130bc72f2f88af86d630a 5KB
a8ad59cd389823dcc7e981d53651f7872ad3c5 443KB
ae743b1ca07333e7283bbc49c18349f8f5ba5d 655KB
afb38767f6bf1f28ac2adf493d2df6e87778ab 121B
b4e596ba2c9140a638c2f95648f0c25858e915 122B
b51605189f739043af08bfa68b2a8ecbbd33af 654KB
b7164a96e28233c41591999ee6c447f6f7f593 513B
b804059eab03189c15b7152b7462c997f9c7b6 657KB
ba18f76f6f0e6fcf7b4befe4c36516ed1d889b 657KB
baecf58fb01c38ffb161716e33ba5061570dc4 366B
c37411afd04858d7268c10384f34e28e20e99d 1KB
c3ab13186e46382e928f88d1a5f1994b0691f9 575B
cc368c06296e47b0b9e35632c25a057148695a 139B
COMMIT_EDITMSG 16B
PEMS08_astgcn.conf 1KB
METR_LA_astgcn.conf 561B
PEMS04_astgcn.conf 550B
config 239B
d18c68764cb3bb1811f02a5ebaf3cffb94a3f0 2KB
d50b598bf459b2a9c9b94e3b8bfc3482868675 657KB
d566279115ba24b7c920f2ddda01bc01b1e34d 323B
d64429bf421126b7000c94ce0f6fd186fbd01f 71B
d78e67235b523aa80e8f112dce3274b84c95db 153B
description 73B
dfb552e06555c25f6e4608e6ef1a475344bebe 86B
e585331c653454f89012f8628f78940cd5a37a 299B
e72678a479d05bcb13c5cd3e309342ec32c5c0 4KB
e81c94d642675146745dc4d3d8b71826aa3255 70B
ea6aaa6a79fc55a06cbcc5a4ed4a588800d6ab 656KB
eb52be1708acfb13273caacbfdc58ae6271e9a 655KB
ee3891462d2b90d9b2da1fa5b0bc9bf49632eb 655KB
ee7b0826c1f5b4a1e6b83cae060b95e5ff2497 456.71MB
exclude 240B
f231c785587dda6d72077e1329e6cb87e6ab55 1KB
f2693de8bdff8efeb6150371e7d46e9d853608 7KB
f3e0d7f3bd6ffefab487d05c6fbecf6ba475a2 657KB
f3e84a00417573aa8487fe1e9e8cd13c6026c8 17.42MB
fb1f90c109e707f4464c24860923026a04e6b2 653KB
fbe7275e6b4540ae51a22d1abf98b2c016938f 2KB
FETCH_HEAD 0B
HEAD 342B
HEAD 23B
pack-2aa4c67e48577eaa0ed6c33fb0f2bcf365eb82f0.idx 3KB
ASTGCN_r.iml 324B
index 9KB
Untitled.ipynb 4KB
Untitled-checkpoint.ipynb 72B
master 342B
master 41B
README.md 2KB
pack-2aa4c67e48577eaa0ed6c33fb0f2bcf365eb82f0.pack 1.28MB
共 141 条
- 1
- 2
panbaoran913
- 粉丝: 3w+
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0