GithubHelp home page GithubHelp logo

rrrrrrzy / stid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zezhishao/stid

0.0 0.0 0.0 2.18 MB

Code for our CIKM'22 paper Spatial-Temporal Identity: A Simple yet Effective Baseline for Multivariate Time Series Forecasting.

Shell 0.06% Python 77.57% Jupyter Notebook 22.37%

stid's Introduction

Spatial-Temporal Identity: A Simple yet Effective Baseline for Multivariate Time Series Forecasting

Code for our CIKM'22 short paper: "Spatial-Temporal Identity: A Simple yet Effective Baseline for Multivariate Time Series Forecasting".

Our code is built on BasicTS, an open-source standard time series forecasting benchmark. You can also find STID in BasicTS.

We recommend you use BasicTS to find more baselines and more detailed comparisons.

model archtecture

Multivariate Time Series (MTS) forecasting plays a vital role in a wide range of applications. Recently, Spatial-Temporal Graph Neural Networks (STGNNs) have become increasingly popular MTS forecasting methods due to their state-of-the-art performance. However, recent STGNN-based methods are becoming more sophisticated with limited performance improvements. This phenomenon motivates us to explore the critical factors of MTS forecasting and design a model that is as powerful as STGNNs, but more concise and efficient. In this paper, we identify the indistinguishability of samples in both spatial and temporal dimensions as a key bottleneck, and propose a simple yet effective baseline for MTS forecasting by attaching Spatial and Temporal IDentity information (STID). STID achieves the best performance and efficiency simultaneously based on simple multi-layer perceptrons (MLPs). These results suggest that by solving the indistinguishability of samples, we can design models more freely, without being limited to STGNNs.

๐Ÿ“š Table of Contents

basicts   --> The BasicTS, which provides standard pipelines for training MTS forecasting models. Don't worry if you don't know it, because it doesn't prevent you from understanding STID's code.

datasets  --> Raw datasets and preprocessed data

figures   --> Some figures used in README.

scripts   --> Data preprocessing scripts.

stid/stid_arch      --> The implementation of STID.

stid/STID_${DATASET_NAME}.py    --> Training configs.

Replace ${DATASET_NAME} with one of PEMS03, PEMS04, PEMS07, PEMS08, METR-LA, and PEMS-BAY.

๐Ÿ’ฟRequirements

The code is built based on Python 3.9, PyTorch 1.10.0, and EasyTorch. You can install PyTorch following the instruction in PyTorch. For example:

pip install torch==1.10.0+cu111 torchvision==0.11.0+cu111 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html

After ensuring that PyTorch is installed correctly, you can install other dependencies via:

pip install -r requirements.txt

๐Ÿ“ฆ Data Preparation

Download Data

You can download all the raw datasets at Google Drive or Baidu Yun(password: 6v0a), and unzip them to datasets/raw_data/.

Data Preprocessing

cd /path/to/your/project
python scripts/data_preparation/${DATASET_NAME}/generate_training_data.py

Replace ${DATASET_NAME} with one of METR-LA, PEMS-BAY, PEMS03, PEMS04, PEMS07, PEMS08, or any other supported dataset. The processed data will be placed in datasets/${DATASET_NAME}.

Or you can pre-process all datasets by.

cd /path/to/your/project
bash scripts/data_preparation/all.sh

๐ŸŽฏ Train STID

python stid/run.py --cfg stid/STID_${DATASET_NAME}.py --gpus '0'

Replace ${DATASET_NAME} with one of PEMS03, PEMS04, PEMS07, PEMS08, METR-LA, and PEMS-BAY, e.g.,

python stid/run.py --cfg stid/STID_PEMS04.py --gpus '0'

๐Ÿ“ˆ Experiment Results

main results

visualizations

efficiency and ablation

๐Ÿ”— More Related Works

Citing

@inproceedings{10.1145/3511808.3557702,
author = {Shao, Zezhi and Zhang, Zhao and Wang, Fei and Wei, Wei and Xu, Yongjun},
title = {Spatial-Temporal Identity: A Simple yet Effective Baseline for Multivariate Time Series Forecasting},
year = {2022},
booktitle = {Proceedings of the 31st ACM International Conference on Information & Knowledge Management},
pages = {4454โ€“4458},
location = {Atlanta, GA, USA}
}

stid's People

Contributors

zezhishao avatar dependabot[bot] avatar

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.