Coder Social home page Coder Social logo

pvcgn's Introduction

Physical-Virtual Collaboration Modeling for Intra-and Inter-Station Metro Ridership Prediction

This is a PyTorch implementation of Physical-Virtual Collaboration Modeling for Intra-and Inter-Station Metro Ridership Prediction.

Due to the widespread applications in real-world scenarios, metro ridership prediction is a crucial but challenging task in intelligent transportation systems. However, conventional methods either ignore the topological information of metro systems or directly learn on physical topology, and cannot fully explore the patterns of ridership evolution. To address this problem, we model a metro system as graphs with various topologies and propose a unified Physical-Virtual Collaboration Graph Network (PVCGN), which can effectively learn the complex ridership patterns from the tailor-designed graphs. Specifically, a physical graph is directly built based on the realistic topology of the studied metro system, while a similarity graph and a correlation graph are built with virtual topologies under the guidance of the inter-station passenger flow similarity and correlation. These complementary graphs are incorporated into a Graph Convolution Gated Recurrent Unit (GC-GRU) for spatial-temporal representation learning. Further, a Fully-Connected Gated Recurrent Unit (FC-GRU) is also applied to capture the global evolution tendency. Finally, we develop a Seq2Seq model with GC-GRU and FC-GRU to forecast the future metro ridership sequentially. Extensive experiments on two large-scale benchmarks (e.g., Shanghai Metro and Hangzhou Metro) well demonstrate the superiority of our PVCGN for station-level metro ridership prediction. Moreover, we apply the proposed PVCGN to address the online origin-destination (OD) ridership prediction and the experiment results show the universality of our method.

If you use this code for your research, please cite our paper https://ieeexplore.ieee.org/abstract/document/9269513 :

@article{liu2020physical,
  title={Physical-Virtual Collaboration Modeling for Intra-and Inter-Station Metro Ridership Prediction},
  author={Liu, Lingbo and Chen, Jingwen and Wu, Hefeng and Zhen, Jiajie and Li, Guanbin and Lin, Liang},
  journal={IEEE Transactions on Intelligent Transportation Systems},
  year={2020},
  publisher={IEEE}
}

Requirements

  • python3
  • numpy
  • yaml
  • pytorch
  • torch_geometric

Extract dataset

cd data && tar xvf data.tar.gz

Train

  • SHMetro
python ggnn_train.py --config
data/model/ggnn_sh_multigraph_rnn256_global_local_fusion_input.yaml
  • HZMetro
python ggnn_train.py --config
data/model/ggnn_hz_multigraph_rnn256_global_local_fusion_input.yaml

Test

First of all, download the trained model and extract it to trained folder.

mkdir trained
mv trained.zip trained
cd trained && unzip trained.zip
  • SHMetro
python ggnn_evaluation.py --config trained/sh.yaml
  • HZMetro
python ggnn_evaluation.py --config trained/hz.yaml

pvcgn's People

Contributors

ivechan avatar liulingbo918 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pvcgn's Issues

About Correlation Graph

Hello, I found that the rows or columns of the Correlation Graph do not add up to 1, and some values are very small. Is there anything wrong with the Correlation Graph?

About dataset

hi, thanks a lot for your datasets, but l only get the processed data, where can i get the data with the userid and OD informations,
We are expecting a reply , thanks

Please explain the format of HZMetro and SHMetro datasets

Dear author, thank you for your wonderful paper and your new dataset. However, I couldn't find a detailed description of the new HZMetro and SHMetro datasets format. Specifically, I don't understand the format of train/val/test.pkl in the dataset folder. These pkl files contain 4 keys of ['x', 'y', 'xtime', 'ytime'], and the value of key 'x' and 'y' is in the shape of (N, 4, 80, 2). What are the meanings of 'x' and 'y'? And what do the different dimensions of value mean? Looking forward to your reply.

Some questions about predicting the time step.

I'm sorry to bother you, but I'm just beginning to get in touch with deep learning. I have some doubts, hope you could reply me in your spare time.
The first question is, how to understand the 15-minute, 30-minute, 45-minute, 60-minute experiment results in your paper? The second question is, does your model support passenger flow forecasting at an interval of five minutes, and if so, what should I do?
Thank you very much again and look forward to your reply~

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.