Giter VIP home page Giter VIP logo

mvstt's Introduction

MVSTT: A Multi-View Spatial-Temporal Transformer Network for Traffic Forecasting

Requirements

  • python 3.7.0
  • torch==1.7.1
  • scipy==1.7.0
  • pandas==1.3.1
  • numpy==1.20.3

Data Preparation

MVSTT is implemented on those several public traffic datasets.

  • PEMS03, PEMS04, PEMS07 and PEMS08 from STSGCN (AAAI-20).
  • Due to the size limitation of the dataset, you can access our dataset in Google Cloud Drive.PEMS

Model Train

PEMS03, PEMS04, PEMS07, PEMS08:

Run python train.py with parameters.

  • --dataset: The datasets name.
  • --train_rate: The ratio of training set.
  • --seq_len: The length of input sequence.
  • --pre_len: The length of output sequence.
  • --batchsize: Number of training batches.
  • --heads: The number of heads of multi-head attention.
  • --dropout: Dropout.
  • --lr: Learning rate.
  • --in_dim: Dimensionality of input data.
  • --embed_size: Embedded dimension.
  • --epochs:The number of train epochs.
python train.py --dataset PEMS08

Model Test

The pre-trained model is available in Google Cloud Drive.pre-trained model

PEMS03, PEMS04, PEMS07, PEMS08:

Run python test.py with parameters.

  • --model: Trained model paths.
python test.py --dataset PEMS08 --model model/PEMS08/PEMS08.pkl

mvstt's People

Contributors

jiansol avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kianzzzz

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.