Research Article

ST-AGRNN: A Spatio-Temporal Attention-Gated Recurrent Neural Network for Traffic State Forecasting

Algorithm 1

Training of ST-AGRNN.
Input: The training epoch ; the historical traffic state ; the traffic graph ; the window size of historical traffic state ; the predicted length of traffic state ;
Output: Learned ST-AGRNN model
1: Initialization parameter ;
2: Data processing;
3: For do
4: Select real historical data ;
5: Select real future data ;
6: Input real historical data and the traffic graph into GCN and GRU to get ;
7: Input into attention to get ;
8: Use DeepWalk on and get the embedding result ;
9: Concatenate and ,;
10: Optimize by minimizing the loss function;
11: End for