Skip to content

This model is a modified version of TGCN(Temporal Graph Convolution Network) for traffic prediction where the adjacency matrix has been replaced by the centrality matrices: Degree Centrality and Closeness Centrality Matrix. This helped in achieving improved results over multiple evaluation metrics. It has been tested on 2 datasets: SZ and Losloop.

Notifications You must be signed in to change notification settings

Rajnish-bhagat/Traffic-Prediction-TGCN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T-GCN-PyTorch

This is a modified PyTorch implementation of T-GCN (Temporal Graph Convolutional Network).

Requirements

  • numpy
  • matplotlib
  • pandas
  • torch
  • pytorch-lightning>=1.3.0
  • torchmetrics>=0.3.0
  • python-dotenv

Model Training

# GCN
python main.py --model_name GCN --max_epochs 3000 --learning_rate 0.001 --weight_decay 0 --batch_size 64 --hidden_dim 100 --settings supervised --gpus 1
# GRU
python main.py --model_name GRU --max_epochs 3000 --learning_rate 0.001 --weight_decay 1.5e-3 --batch_size 64 --hidden_dim 100 --settings supervised --gpus 1
# T-GCN
python main.py --model_name TGCN --max_epochs 3000 --learning_rate 0.001 --weight_decay 0 --batch_size 32 --hidden_dim 64 --loss mse_with_regularizer --settings supervised --gpus 1

You can also adjust the --data, --seq_len and --pre_len parameters.

Run tensorboard --logdir lightning_logs/version_0 to monitor the training progress and view the prediction results.

About

This model is a modified version of TGCN(Temporal Graph Convolution Network) for traffic prediction where the adjacency matrix has been replaced by the centrality matrices: Degree Centrality and Closeness Centrality Matrix. This helped in achieving improved results over multiple evaluation metrics. It has been tested on 2 datasets: SZ and Losloop.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages