Skip to content

Pattern-Matching Dynamic Memory Network for Dual-Mode Traffic Prediction

Notifications You must be signed in to change notification settings

wengwenchao123/PM-DMNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pattern-Matching Dynamic Memory Network for Dual-Mode Traffic Prediction

This is a PyTorch implementation of Pattern-Matching Dynamic Memory Network for Dual-Mode Traffic Prediction

PWC PWC PWC PWC PWC

Table of Contents

  • configs: training Configs and model configs for each dataset

  • lib: contains self-defined modules for our work, such as data loading, data pre-process, normalization, and evaluate metrics.

  • model: implementation of our model

  • data: contains relevant datasets

Requirements

Python 3.6.5, Pytorch 1.9.0, Numpy 1.16.3, argparse and configparser

Data Preparation

For convenience, we package these datasets used in our model in Google Drive.

Unzip the downloaded dataset files into the data folder.

Model Training

python run.py --datasets {DATASET_NAME} --type {MODEL_TYPE} --mode {MODE_NAME} 

Replace {DATASET_NAME} with one of datasets.

such as python run.py --dataset NYC-Taxi16

To run PM-DMNet with the desired configuration, set the type parameter accordingly:

  • Set type P to run PM-DMNet(P).
  • Set type R to run PM-DMNet(R).

There are two options for {MODE_NAME} : train and test

Selecting train will retrain the model and save the trained model parameters and records in the experiment folder.

With test selected, run.py will import the trained model parameters from {DATASET_NAME}.pth in the 'pre-trained' folder.

Here is an example of how to run the script using the specified parameters:

python run.py --dataset PEMSD8 --type P --mode train

About

Pattern-Matching Dynamic Memory Network for Dual-Mode Traffic Prediction

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages