GithubHelp home page GithubHelp logo

jingweizuo / gcn-m Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 93 KB

Repository for the paper "Graph Convolutional Networks for Traffic Forecasting with Missing Values" in DMKD'22

License: Apache License 2.0

Python 100.00%
deep-learning graph-convolutional-networks memory-networks missing-values neural-networks traffic-forecasting

gcn-m's Introduction

GCN-M: Graph Convolutional Networks for Traffic Forecasting with missing values

This is the companion repository for our paper titled Graph Convolutional Networks for Traffic Forecasting with missing values published in Data Mining and Knowledge Discovery and also available on ArXiv.

Requirements:

  • matplotlib == 3.2.1
  • numpy == 1.19.2
  • pandas == 0.25.1
  • scikit_learn == 0.21.2
  • torch == 1.6.0
  • tensorwatch == 0.9.1

Dependencies can be installed using the following command:

pip install -r requirements.txt

Data

Step1:

  • Download METR-LA and PEMS-BAY data from Google Drive or Baidu Yun links provided by DCRNN.
  • Put the downloaded data into the repository mentioned in "config/DATASET.conf"

Step2: Preprocess raw data

python data/generate_dated_data.py

Usage

python main.py --config CONFIG_FILE --itr NBR_ITERATION

Citation

If you find this repository useful in your research, please consider citing the following paper:

@article{zuo2023graph,
  title     = {Graph convolutional networks for traffic forecasting with missing values},
  author    = {Zuo, Jingwei and Zeitouni, Karine and Taher, Yehia and Garcia-Rodriguez, Sandra},
  journal   = {Data Mining and Knowledge Discovery},
  volume    = {37},
  number    = {2},
  pages     = {913--947},
  year      = {2023},
  publisher = {Springer}
}

gcn-m's People

Contributors

gcn-m avatar jingweizuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

johnny328

gcn-m's Issues

error when run the GCN-M model

In the definition of GCNMdynamic model, define the gated_conv as:
self.gate_convs.append(nn.Conv1d(in_channels=residual_channels, out_channels=dilation_channels, kernel_size=(1, kernel_size), dilation=new_dilation))

when run the model in metr_la dataset, get an error when calculate gate = self.gate_convs[i](residual) # kernel=(1,2)
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [32, 32, 207, 13]

I think the residual got the correct shape of (B, residual_size, D, F) as noted. Is this a problem caused by the improper vision of torch?
Could you please help me solve this problem, I will appreciate any assistance you can provide.

No module named encoder, decoder, attn and embed

Thank you for your great contributions! I failed to run the code because no modules named encoder, decoder, attn, and embed. Could you please provide these files? Thank you for your patience!

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.