# TrafficWave: Generative Deep Learning Architecture for Vehicular Traffic Flow Prediction
## 5 Results  
The following metrics have been used for results evaluation.  
Mean absolute percentage error (MAPE), defined as:  
\[\frac{100\%}{n}\sum_{t=1}^{n}\left|\frac{A_{t}-F_{t}}{A_{t}}\right|.\]  
Mean absolute error (MAE), defined as:  
\[\frac{\sum_{i=1}^{n}\left|A_{t}-F_{t}\right|}{n}.\]  
Root mean square error (RMSE):  
\[\sqrt{\frac{\sum_{i=1}^{N}\left(A_{t}-F_{t}\right)^{2}}{N}},\]  
where \(A_{t}\) is the actual value and \(F_{t}\) is the forecast value.  
Experiments were performed using AMD Ryzen threadripper 1920x with 64 GB RAM and Nvidia Titan RTX with Nvidia CUDA and Keras with Tensorflow GPU backend.  
Table 1 shows the results obtained on the Caltrans dataset.  
The proposed architecture outperforms all other architectures in terms of MAPE. MAPE is a percentage value so that it has a simple and intuitive understanding: in general, TrafficWave performs better than other approaches. Results related to RMSE and MAE report that SAEs is able to perform, in specific cases, an error lower than TrafficWave, however the distance (in terms of performance) is little. SAEs are able to limit huge errors in general, but TrafficWave is able to suddenly capture trend changes, this can be seen in Figures 8 and 9, but often at the cost of a major error.  
It is worth noting that the training time is very high compared to other networks. However, this is a minor limitation since training is usually performed off-line. Table 1 also reports results obtained by other authors on the same dataset, however, it is important to state that these tests were performed on different months and with different aggregations. This is the main point of this benchmark: compare the state of art techniques plus a novel one (TrafficWave), on the exact same data and same conditions.  
\begin{table}
\begin{tabular}{c c c c c} \hline  & **MAPE** & **MAE** & **RMSE** & **TIME** \\ \hline
**TrafficWave** & **15.522\%** & **6.229** & **8.668** & **5293s** \\
**LSTM** & 15.703\% & 6.274 & 8.734 & 820s \\
**GRU** & 17.757\% & 6.323 & 8.637 & 641s \\
**SAEs** & 16.742\% & 6.095 & 8.335 & 1163s \\
**[PERSON] et al. [19]** & _NA_ & _25.26_ & _35.45_ & _NA_ \\
**[PERSON] et al. [15]** & _NA_ & _17.211_ & _25.86_ & _NA_ \\
**[PERSON] et al. [9]** & _NA_ & _34.1.8_ & _50.0_ & _NA_ \\ \hline \end{tabular} Note: Bold is the solution proposed in this work. Normal have been calculated. Italics are just reported from other works.  
\end{table}
Table 1: Performance on Caltrans dataset.  
Figure 8 shows the prediction trend of the different neural networks over time.  
Table 2 reports results obtained on the TRAP-2017 dataset. Results confirm that TrafficWave outperforms all other approaches. Considerations are similar to those already reported for the Caltrans dataset. Figure 9 confirms that the proposed architecture has the closest pattern with the ground through data.  
Once more, TrafficWave needs more computational time than other techniques. The reason relies on the high complexity of the model. The architecture, being a generative one, it reaches 199 sequential  
\begin{table}
\begin{tabular}{c c c c c} \hline  & **MAPE** & **MAE** & **RMSE** & **TIME** \\ \hline
**TrafficWave** & **14.929\%** & **35.406** & **50.902** & **893s** \\
**LSTM** & 15.991\% & 37.959 & 53.552 & 292s \\
**GRU** & 15.964\% & 37.879 & 53.669 & 245s \\
**SAEs** & 16.674\% & 36.374 & 51.267 & 198s \\ \hline \end{tabular}
\end{table}
Table 2: Performance on the TRAP-2017 dataset.  
Figure 8: Intraday flow prediction for Caltrans dataset.  
Figure 9: Intraday flow prediction for first Monday of November 2017 from TRAP-2017 dataset.  
hidden layers. It is more difficult to be trained if compared to sequential architecture. This is caused by stacking dilated convolutions as previously explained.  
Table 3 shows the MAPE for all the weekdays. TrafficWave outperforms all the competition achieving the lower error in all the weekdays, confirming results already observed for a single day.