Giter VIP home page Giter VIP logo

ctslstm's Introduction

CTS-LSTM

CTS-LSTM: LSTM-based neural networks for Correlated Time Series prediction

The framework of CTS-LSTM

Fig.1 The framework of CTS-LSTM

The structure of ST-cell

Fig.2 The structure of ST-cell

Dataset

The air quality dataset is scratched from a public website.

Statistics of the air quality dataset:

Statistics of the air quality dataset

We select 1st Jan. 2017 to 19th Nov. 2017 as the training set, and the remainders as the test set.

The values of the sensors in a city are correlated in the spatial dimension since pollutants diffuse and aggregate gradually in the space. For each pollutant, we predict the values of all the sensors in the following day, thus the prediction time interval .

The spatial relationship matrix is initialized by the reciprocal of distance between sensors.

Finally, we provide three air quality dataset:

  • BeijingNO2

  • BeijingO3

  • LondonNO2

and two spatial relationship of sensors in Beijing and London:

  • beijingPriorMatirx
  • londonPriorMatirx

Requirements

  • python == 3.6
  • Keras == 2.1.2
  • TensorFlow == 1.7.0

Usage

The model implement mainly lies in "CTSLSTM.py" which is well commented.

Before running the code, you can modify the "HyperParameters.json" to try other parameters or use other dataset to train or test the model.

To train and test our model on BeijingNO2 dataset, simply run the following command:

python train.py

Citing

If you find our work is helpful for your research, please kindly consider citing our paper as well:

@article{wan2019cts,
title={CTS-LSTM: LSTM-based neural networks for correlatedtime series prediction},
author={Wan, Huaiyu and Guo, Shengnan and Yin, Kang and Liang, Xiaohui and Lin, Youfang},
journal={Knowledge-Based Systems},
year={2019},
publisher={Elsevier}
}

ctslstm's People

Contributors

bettermia avatar

Stargazers

 avatar  avatar  avatar jiangyiqiao avatar KaijunL avatar  avatar

Watchers

James Cloos avatar  avatar

ctslstm's Issues

24h predict 12h

I wonder if the input and output scale must be the same, for example, how to predict 12 hours with 24 hours?

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.