# Weather-Aware Long-Range Traffic Forecast Using Multi-Module Deep Neural Network
## 4 Experimental Results and Discussion  
### Experimental Setup  
We tested the developed forecasting system, TW-DNN; the initial setup is described as follows. For the purpose of comparison, we employed three general traffic prediction models, CNN, \(k\)-nearest neighbor, and autoregressive integrated moving average predictors presented as _CNN-only_, \(k\)-\(nn\), and _ARIMA_, respectively [5, 14, 26]. They were chosen as representatives of the neural network model, non-neural machine learning model, and time series model, respectively. Figure 6 shows the simplified view of the TW-DNN, CNN, \(k\)-nn, and ARIMA. All models iteratively forecast speeds based on the previous traffic data. In the prediction, TW-DNN and CNN-only consider many nearby links, whereas \(k\)-nn and ARIMA consider one link at a time. In CNN-only, the prediction results are output after the data traverses through convolution, pooling, and fully connected layers. Analogous to TW-DNN, the CNN-only also rearranges supplied input into a 2D array. Meanwhile, \(k\)-nn computes the speed by finding the nearest speed values from the stored dataset that are matched to the previous \(R\) windows. It selects a set of \(k\) speed data that minimize the prediction error \(D\) (squared error, or the _distance_), defined as \(D_{L}=\sum_{i=1}^{R}\left(v_{candidate}(x,t-i\Delta t)-v_{train_{L}}(x,t-i \Delta t)\right)^{2}\), where \(L\) represents an index of the stored data. Here, \(v_{candidate}(x,t)\) and \(v_{train}(x,t)\) denote the speed values of a candidate and measured data in the training set, respectively. The prediction output is the average of such \(k\) speed values. ARIMA predicts the speeds with the linear combination of speed data of previous \(R\) windows, as well as the difference and the noisy term of the predicted speed. Each prediction model was responsible for forecasting speeds for a time interval of 24 h (i.e., \(t_{\text{end}}-t_{\text{start}}=24\) h). Three cases of the input were used to represent different road traffic states in the prediction: a regular day, a holiday, and a day with severe weather. These cases are selected from year 2016, and weather records for those days are loaded into the TW-DNN. All models are properly modified to fit our experiments and road network to deliver the best results. The following are the specific values used in the experiments. * Prediction time interval \(\Delta t=5\) min
* Historical data used for the current window \(R=8\), \(R\Delta t=40\) min  
\(\Delta t\) is equal to the time interval of traffic records. The initial traffic data of all three models were obtained from the initial traffic predictor of TW-DNN. We used a rectified linear unit and an Adam optimizer [27] as a default activation function and optimizer, respectively. For \(k\)-nn, we empirically chose \(k\) as 5 to yield the best results. Figure 6: Simplified view of (**a**) TW-DNN, (**b**) CNN-only, (**c**) \(k\)-nn, and (**d**) ARIMA. The experiments used a typical highway network surrounding a big city, for which Daegu, South Korea, was selected. It consists of four bidirectional highways with 241 links, as shown in Figure 7. The network has five endpoints and 18 interchanges. The traffic data used in the training were obtained from the Korea Expressway Corporation [28]. This dataset is a collection of traffic data of all nodes and links recorded every five minutes. Traffic flow and weather data of 2015 were used as a training dataset, which was preprocessed prior to utilization in the prediction models as follows. * When the training dataset was extracted, speeds and flows larger than the 98 th percentile were removed as outlier data. * The time-domain moving averages of the speeds and flows were used instead of the raw data, to reduce noise. The window size for moving the average of time \(t\) was chosen as \([t-\Delta t,t+\Delta t]\). * All data were linearly scaled to lie within \([0,1.0]\).