Code Monkey home page Code Monkey logo

deepstn's Introduction

DeepSTN+

Keras implementation of DeepSTN+: Context-aware Spatial-Temporal Neural Network for Crowd Flow Prediction in Metropolis. Ziqian Lin^, Jie Feng^, Ziyang Lu, Yong Li, and Depeng Jin. AAAI 2019. (^ indicates equal contribution) PDF If our codes is helpful to your research, you can cite our work by:

@article{lin2019deepstn+:,
title={DeepSTN+: Context-aware Spatial Temporal Neural Network for Crowd Flow Prediction in Metropolis},
author={Lin, Ziqian and Feng, Jie and Lu, Ziyang and Li, Yong and Jin, Depeng},
booktitle={Thirty-Thrid AAAI Conference on Artificial Intelligence},
year={2019}
}

Datasets

Similar to ST-ResNet, our dataset is from the NYC Bike. Besides, we collect 9 types of PoIs for this dataset. The spatial map size of the dataset is 21x12. The dataset is in the folder /DATA/dataBikeNYC flow_data.npy ( TimeLenth x In&OutFlow x MapHeight x MapWidth = 4392 x 2 x 21 x 12 ) and poi_data.npy ( PoICategories x MapHeight x MapWidth = 9 x 21 x 12 ) for directly used.

Requirements

  • python 3.5
  • Keras 2.0
  • NumPy

Project Structure

File BikeNYC corresponds the Dataset BikeNYC in the Paper DeepSTN+.

  • /DATA
    • dataBikeNYC contain dataset flow_data.npy and poi_data.npy
    • lzq_read_data_time_poi.py transfer flow_data.npy and poi_data.npy to the input of the DeepSTN+ network
  • /DST_network baseline from ST-ResNet
    • ilayer.py
    • metrics.py
    • STResNet.py
  • /DeepSTN_00/SCORE are used to save the results of DeepSTN
  • /DeepSTN_10/SCORE are used to save the results of DeepSTN+plus
  • /DeepSTN_01/SCORE are used to save the results of DeepSTN+PoI$*$time
  • /DeepSTN_11/SCORE are used to save the results of DeepSTN+plus+PoI$*$time
  • /DeepSTN_network
    • DeepSTN_net.py model codes for DeepSTN+
    • metrics.py contains the metric RMSE
  • /ComparisonBikeNYC.py you can run this file to get the results of ST-ResNet and DeepSTN in the paper.

Usage

python ComparisonBikeNYC.py

Other parameters:

Refer to ComparisonBikeNYC.py and DeepSTN_net.py

  • for training:
    • epoch, batch_size, lr, days_test, iterate_num
    • XDST, X11, X10, X01, X00, trainDST, train11, train10, train01, train00
  • model definition: H, W, channel, T, len_closeness, len_period, len_trend, T_closeness, T_period, T_trend, pre_F, conv_F, R_N, drop, is_plus, plus, rate, is_pt, P_N, T_F, PT_F, is_summary, kernel1, isPT_F

deepstn's People

Contributors

vonfeng avatar clannadkey avatar

Watchers

James Cloos 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.