Git Product home page Git Product logo

stnscm's Introduction

Spatio-temporal Neural Structure Causal Model (STNSCM)

This is the official release code of AAAI2023 accepted paper: "Spatial temporal Neural Structural Causal Models for Bike Flow Prediction"

The repository contains the necessary resources to run the experiments of the paper.

Introduction

We propose a Spatio-Temporal Neural Structural Causal Model (STNSCM), and the causal graph shown in Fig. 1(c) and (d).

Its core idea is based on structural causal model theory to remove confounders in the feature extraction process and follow the counterfactual reasoning framework to predict future bike flow.

First, we apply the frontdoor criterion based on causal intervention, cutting off the link $\mathbf{C}_t \to \mathbf{X}_t$, which gives $\mathbf{X}_t$ a fair opportunity to incorporate each contextual condition $\mathbf{C}$ into spatio-temporal state $\mathbf{H}_t$.

Second, we view future scenarios in a "what if" way, that is, if the current environment changes, how will the future state change, and thus how will future flow change? The key to answer this counterfactual question is how to make full use of future external conditions.

How to run

It's very simple to run, just modify the data_name in main.py

Change test_only=True in data/ ckpt /data_name/config.yaml

data_name = 'BJ' Test the Beijing bike-sharing dataset

data_name = 'NYC' Test the NYC bike-sharing dataset

Train

Change test_only=False in data/ ckpt /data_name/config.yaml

data_name = 'BJ' Train the Beijing bike-sharing dataset

data_name = 'NYC' Train the NYC bike-sharing dataset

Model

Thank you for your attention to our work.

If you find this repository, e.g., the code and the datasets, useful in your research, please cite the following paper:

@inproceedings{Zhao2023STNSCM,
    title={Spatial temporal Neural Structural Causal Models for Bike Flow Prediction},
    author={Zhao, Yu and Deng, Pan and Liu, Junting and Jia, Xiaofeng and Wang, Mulan},
    booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
    year={2023}
}

stnscm's People

Contributors

eternityzy 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.