Skip to content

Latest commit

 

History

History
66 lines (54 loc) · 2.31 KB

File metadata and controls

66 lines (54 loc) · 2.31 KB

Large Scale Spatio-Temporal Forecasting Scenario

In this sub-scenario, we use and adapt the code repository of the PatchSTG model.

Requirements

  • torch==1.11.0
  • timm==1.0.12
  • scikit_learn==1.0.2
  • tqdm==4.67.1
  • pandas==1.4.1
  • numpy==1.22.3

Folder Structure

└── code-and-data
    ├── config                 # Including detail configurations
    ├── cpt                    # Storing pre-trained weight files (manually create the folder and download files)
    ├── data                   # Including traffic data (download), adj files (generated), and the meta data
    ├── lib
    │   |──  utils.py          # Codes of preprocessing datasets and calculating metrics
    ├── log                    # Storing log files
    ├── model
    │   |──  models.py         # The core source code of our PatchSTG
    ├── main.py                # This is the main file for training and testing
    └── README.md              # This document

Datasets

You can access the well pre-processed datasets from [Google Drive], then place the downloaded contents under the correspond dataset folder such as ./data/SD.

Quick Start

  1. Download datasets and place them under ./data
  2. We provide pre-trained weights of results in the paper and the detail configurations under the folder ./config.

To test PatchSTG w/o ST-TTC (i.e., Normal test) on different datasets, First, you should make sure that line 391 in main.py file contains the following:

solver.test()

and then, you can execute the Python file in the terminal:

python main.py --config ./config/CA.conf
python main.py --config ./config/GBA.conf
python main.py --config ./config/GLA.conf
python main.py --config ./config/SD.conf

To test PatchSTG w/ ST-TTC on different datasets, First, you should make sure that line 391 in main.py file contains the following:

solver.test_with_ttc()

and then, you can execute the Python file in the terminal:

python main.py --config ./config/CA.conf
python main.py --config ./config/GBA.conf
python main.py --config ./config/GLA.conf
python main.py --config ./config/SD.conf