LMissher / STWave

[ICDE'2023] When Spatio-Temporal Meet Wavelets: Disentangled Traffic Forecasting via Efficient Spectral Graph Attention Networks

Home Page:https://ieeexplore.ieee.org/document/10184591

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ICDE'2023] STWave

πŸ“– Introduction

This is a official PyTorch implementation of the paper: When Spatio-Temporal Meet Wavelets: Disentangled Traffic Forecasting via Efficient Spectral Graph Attention Networks.

PWC PWC PWC PWC

⚑ Environment

  • PyTorch
  • fastdtw
  • PyWavelets

πŸ”§ Data Preparation

PeMSD3 & PeMSD4 & PeMSD7 & PeMSD8

  • Download the data PeMSD* with code: p72z.
  • Unzip them to corresponding folders.

PeMSD7(M) & PeMSD7(L)

  • Download the data PeMSD7(M).

  • Email authors of STGCN to get the data PeMSD7(L).

Tips

  • The name of downloaded datasets should be consistent with the name in config files.

πŸ“‚ Folder Structure

└── code-and-data
    β”œβ”€β”€ config                 # Including detail configurations
    β”œβ”€β”€ cpt                    # Storing pre-trained weight files (should be created)
    β”œβ”€β”€ data                   # Including adj files and the main data should be downloaded
    β”œβ”€β”€ lib
    β”‚   |──  utils.py          # Codes of preprocessing datasets and calculating metrics
    β”‚   |──  graph_utils.py    # Codes of calculating eigens and deriving the temporal graph
    β”œβ”€β”€ log                    # Storing log files (should be created)
    β”œβ”€β”€ model
    β”‚   |──  models.py         # The core source code of our STWave
    β”œβ”€β”€ mian.py                # This is the main file for training and testing
    └── README.md              # This document

πŸš€ Run

Given the example of PeMSD8

mkdir ./cpt/PeMSD8
mkdir ./log/PeMSD8
python main.py --config config/PeMSD8.conf

πŸ’¬ Citation

If you find our work is helpful, please cite as:

@inproceedings{fang2023spatio,
  title={When spatio-temporal meet wavelets: Disentangled traffic forecasting via efficient spectral graph attention networks},
  author={Fang, Yuchen and Qin, Yanjun and Luo, Haiyong and Zhao, Fang and Xu, Bingbing and Zeng, Liang and Wang, Chenxing},
  booktitle={2023 IEEE 39th International Conference on Data Engineering (ICDE)},
  pages={517--529},
  year={2023},
  organization={IEEE}
}

πŸ‘ Contributing

We welcome contributions and suggestions!