Giter Site home page Giter Site logo

magnn's Introduction

1 MAGNN

This repo is the official implementation for Multi-Scale Adaptive Graph Neural Network for Multivariate Time Series Forecasting.

1.1 The framework of MAGNN

framework

2 Prerequisites

  • Python 3.6.12
  • PyTorch 1.0.0
  • math, sklearn, numpy

3 Datasets

To evaluate the performance of MAGNN, we conduct experiments on four public benchmark datasets:Solar-Energy, Traffic, Electricity, and Exchange-Rate.

3.1 Solar-Energy

This dataset contains the collected solar power from the National Renewable Energy Laboratory, which is sampled every 10 minutes from 137 PV plants in Alabama State in 2007.

3.2 Traffic

This dataset contains the road occupancy rates (between 0 and 1) from the California Department of Transportation, which is hourly aggregated from 862 sensors in San Francisco Bay Area from 2015 to 2016.

3.3 Electricity

This dataset contains the electricity consumption from the UCI Machine Learning Repository, which is hourly aggregated from 321 clients from 2012 to 2014.

3.4 Exchange-Rate

This dataset contains the exchange rates of eight countries, which is sampled daily from 1990 to 2016.

4 Running

4.1 Install all dependencies listed in prerequisites

4.2 Download the dataset

4.3 Hyper-parameters search with NNI

# Hyper-parameters search with NNI
 nnictl create --config config.yml --port 8080

4.4 Training

# Train on Solar-Energy
CUDA_LAUNCH_BLOCKING=1 python train.py --save ./model-solar-1.pt --data solar-energy/solar-energy.txt --num_nodes 137 --batch_size 4 --epochs 50 --horizon 3
# Train on Traffic
CUDA_LAUNCH_BLOCKING=1 python train.py --save ./model-traffic-2.pt --data traffic/traffic.txt --num_nodes 862 --batch_size 4 --epochs 50 --horizon 3
# Train on Electricity
CUDA_LAUNCH_BLOCKING=1 python train.py --save ./model-electricity-3.pt --data electricity/electricity.txt --num_nodes 321 --batch_size 4 --epochs 50 --horizon 3
# Train on Exchange-Rate
CUDA_LAUNCH_BLOCKING=1 python train.py --save ./model-exchange-4.pt --data exchange_rate/exchange_rate.txt --num_nodes 8 --batch_size 4 --epochs 50 --horizon 3

5 Citation

Please cite the following paper if you use the code in your work:

@article{chen2022multi,
  title={Multi-Scale Adaptive Graph Neural Network for Multivariate Time Series Forecasting},
  author={Chen, Ling and Chen, Donghui and Shang, Zongjiang and Zhang, Youdong and Wen, Bo and Yang, Chenghu},
  journal={arXiv preprint arXiv:2201.04828},
  year={2022}
}

magnn's People

Contributors

shangzongjiang 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.