Giter Club home page Giter Club logo

affgcn's Introduction

1、Traffic Flow Prediction Architecture: AFFGCN

Spatial-temporal graph convolution network based on multimodal feature fusion, Combining weather data to predict traffic flow: A Spatiotemporal Graph Convolutional Network Method Based on Feature Fusion

Attention Feature Fusion base on spatial-temporal Graph Convolutional Network(AFFGCN)模型总体架构

2、Traffic dataset

Download PEMS04 and PEMS08 datasets provided by ASTGNN

traffic dataset

district Time interval detector feature
PEMS-08 2018.01-2018.02 307 flow, occupy, speed
PEMS-04 2016.07-2016.08 170 flow, occupy, speed

3、Weather Dataset

The weather dataset for this article is from the Iowa Atmospheric Observatory website at Iowa State University in the United States, which records historical weather data for most parts of the world. You can download the corresponding dataset by selecting seven steps on the website, including country and region, weather characteristics, and time and date. The downloaded weather data is a txt file. By manually converting it into a CSV file and setting the separator, you can better observe the initial state of the weather data.

identifier name significance
1 valid Observation timestamp
2 tmpf Fahrenheit temperature at a height of 2 meters
3 dwpf Dew point temperature
4 relh Relative humidity (%)
5 drct Wind direction in degrees
6 sknt Wind speed in knots
... ... ...
24 peak_wind_gust Peak gust wind value
25 peak_wind_drct Peak gust direction
26 peak_wind_time Peak gust time
27 feel Apparent temperature in Fahrenheit (wind cold or heat index)

To match weather data that matches traffic data, download the corresponding weather data from the mesonet website (Iowa State University's Iowa Atmospheric Observatory network) based on the time and location of the traffic dataset. Firstly, the order of the weather time series corresponding to the time stamp is not processed. Features 15, 19, 24, 25, and 26 are not selected without data collection. Features 21, 22, and 23 are not selected due to the absence of ice accumulation in the time and location corresponding to the traffic dataset. Finally, the time stamp and 17 weather features remain.

weather station 1 weather station 2
district Time interval one-hot Numeric Features
San Francisco Bay Area 2018.01-2018.02 25 13
San Bernardino city 2016.07-2016.08 16 11

Weather Dataset One-hot data:

skyc1、skyc2 wx-codes

Feature code One-hot vector      Feature code One-hot vector
CLR [ 1 , 0, 0, 0, 0, 0]      HZ [ 1, 0, 0, 0, 0, 0, 0]
FEW [ 0, 1, 0, 0, 0, 0]      RA [ 0, 1, 0, 0, 0, 0, 0]
VV [ 0, 0, 1, 0, 0, 0]      BR [ 0, 0, 1, 0, 0, 0, 0]
SCT [ 0, 0, 0, 1, 0, 0]      RA BR [ 0, 0, 0, 1, 0, 0, 0]
BKN [ 0, 0, 0, 0, 1, 0]      BR [ 0, 0, 0, 0, 1, 0, 0]
OVC [ 0, 0, 0, 0, 0, 1]      BCFG [ 0, 0, 0, 0, 0, 1, 0]
     BCFG [ 0, 0, 0, 0, 0, 0, 1]

4、Argparse

  • adj_filename: path of the adjacency matrix file
  • graph_signal_matrix_filename: path of graph signal matrix file
  • num_of_vertices: number of vertices
  • points_per_hour: points per hour, in our dataset is 12
  • num_for_predict: points to predict, in our model is 12

5、Training

  • model_name: AFFGCN
  • ctx: set ctx = cpu, or set gpu-0, which means the first gpu device
  • optimizer: sgd, RMSprop, adam,
  • learning_rate: float, like 0.0001
  • epochs: int, epochs to train
  • batch_size: int
  • K: int, K-order chebyshev polynomials will be used
  • merge: int, 0 or 1, if merge equals 1, merge training set and validation set to train model
  • prediction_filename: str, if you specify this parameter, it will save the prediction of current testing set into this file
  • params_dir: the folder for saving parameters

6、Traffic block

交通模块

7、Weather block

天气模块

affgcn's People

Contributors

yanganynu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

xhfei1224

affgcn's Issues

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.