Git Product home page Git Product logo

fc-gaga-torch's Introduction

FC-GAGA: Fully Connected Gated Graph Architecture for Spatio-Temporal Traffic Forecasting

BasicTS EasyTorch

Pytorch code for AAAI'21 paper: "FC-GAGA: Fully Connected Gated Graph Architecture for Spatio-Temporal Traffic Forecasting". Offical code:"https://github.com/boreshkinai/fc-gaga"

The code is developed with BasicTS, a PyTorch-based benchmark and toolbox for time series forecasting.

FC-GAGA

FC-GAGA

Note

1.The result is not good as origin code.It will increase 10% MAE now.
2.I don't use the same hyper-parameters as origin code. Because when i use the same hyper-parameters, it will appear gradient exploding(epsilon=10).
3.I don't use the same LR_SCHEDULER as origin code.
4.These problem will be address after 2 months because i am busy now.If you can address them now, i will appreciate it.(谢谢)

Citing

This version of implementation is only for learning purpose. For research, please refer to and cite from the following paper:

@inproceedings{
  oreshkin2020fcgaga,
  title={{FC-GAGA}: Fully Connected Gated Graph Architecture for Spatio-Temporal Traffic Forecasting},
  author={Boris N. Oreshkin and Arezou Amini and Lucy Coyle and Mark J. Coates},
  booktitle={AAAI},
  year={2021},
}

Requirements

The code is built based on Python 3.9, PyTorch 1.12.0, EasyTorch and BasicTS.

After ensuring that PyTorch is installed correctly, you can install other dependencies via:

pip install -r requirements.txt

Data Preparation

Download Raw Data

The code is now refactored based on BasicTS,and you can get kinds of datasets from it. Then unzip them to datasets/raw_data/.

Pre-process Data

You can pre-process all data via:

cd /path/to/your/project
bash scripts/data_preparation/all.sh

Then the dataset directory will look like this:

datasets
   ├─METR-LA
   ├─METR-BAY
   ├─PEMS04
   ├─raw_data
   |    ├─PEMS04
   |    ├─PEMS-BAY
   |    ├─METR-LA
   ├─README.md

Train

python step/run.py --cfg='model/fc-gaga_$DATASET.py' --gpus='0'
# python step/run.py --cfg='model/fc-gaga_METR-LA.py' --gpus='0'
# python step/run.py --cfg='model/fc-gaga_PEMS-BAY.py' --gpus='0'

Replace $DATASET_NAME with one of METR-LA, PEMS-BAYas shown in the code above. Configuration file model/fc-gaga_$DATASET.py describes the forecasting configurations. Edit BATCH_SIZE and GPU_NUM in the configuration file and --gpu in the command line to run on your own hardware.

fc-gaga-torch's People

Contributors

azusa-yuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.