Skip to content

wangcn0201/Auto-STGCN

Repository files navigation

Auto-STGCN

An automated system for STGCN model development.
Code for paper 'Auto-STGCN: Autonomous Spatial-Temporal Graph Convolutional Network Search Based on Reinforcement Learning and Existing Research Results'.

Environment Building Method for Auto-STGCN:

  • pip install -r requirements.txt

1. Auto-STGCN Algorithm: Searching for the optimal STGCN model

Realated Files

Auto_STGCN.py --- run Auto-STGCN akgorithm
Model.py --- build STGCN model according to code
Env.py --- read dataset, record the state-action-reward information in Auto-STGCN algorithm
ExperimentDataLogger.py --- output the log information of Auto-STGCN algorithm
/Log --- log files
/utils --- auxiliary files
/data --- datasets
/Config --- default configurations

Inputs Details

  • Dataset name, Dataset partition ratio (validation set, test set, training set), Input sequence length, Output sequence length,
  • Timemax, Epoch size of each candidate model,
  • Initial epsilon, Epsilon reduce step, Epsilon decay Ratio, Gamma of Qlearning, Learning rate of Qlearning, Episodes of Qlearning

Outputs Details

  • Code and performance scores of the Optimal STGCN searched by Auto-STGCN
  • Log info of Auto-STGCN

Commands

  • python Auto_STGCN.py --data "PEMS03"
  • python Auto_STGCN.py --data "PEMS03" --gamma 0.1

2. Auto-STGCN Algorithm: Training the optimal STGCN model

Realated Files

TestBestGNN.py --- train the optimal STGCN model searched by Auto-STGCN akgorithm
Model.py --- build STGCN model according to code
/Log --- log files
/utils --- auxiliary files
/data --- datasets
/Config --- default configurations

Inputs Details

  • Optimal STGCN code, Dataset name, Dataset partition ratio (validation set, test set, training set), Input sequence length, Output sequence length,
  • Model training epochs, Model training times,
  • Load model weight = None

Outputs Details

  • Performance scores (Mean + variance: MAE, MAPE, RMSE, Time) of the Optimal STGCN model
  • Log info of the model training

Commands

  • python TestBestGNN.py --model "./Config/qlearning_2.json" --data "PEMS03" --load "None"
  • python TestBestGNN.py --model "./Config/qlearning_2.json" --data "PEMS03" --load "None" --times 20

3. Auto-STGCN Algorithm: Loading the optimal STGCN model

Realated Files

TestBestGNN.py --- test the performance of optimal STGCN model searched by Auto-STGCN akgorithm
Model.py --- build STGCN model according to code
/Log --- log files
/utils --- auxiliary files
/data --- datasets
/Config --- default configurations

Inputs Details

  • Dataset name, test number, Load model weight = Model loading path

Outputs Details

  • Performance scores (Mean + variance: MAE, MAPE, RMSE, Time) of the Optimal STGCN model on test set

Commands

  • python TestBestGNN.py --model "./Config/qlearning_2.json" --data "PEMS03" --load "./Log/PEMS03_experiment2_qlearning2_test/GNN/best_GNN_model.params" --times 20

About

An automated system for STGCN model development.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages