# A Comparative Study of Ensemble Models for Predicting Road Traffic Congestion
## 5 Experimental Results and Discussion
### Comparison of RTC Prediction Results  
Table 5 and Figure 4 show overall results obtained when traditional methods and the bagging method (using RF, DT, and SVM), the AdaBoost method (using RF, DT, and SVM), and the stacking method with a combination of RF, DT, and SVM, with the final estimator as default logistic regression, were used. Results computed by using traditional methods revealed that the DT model obtained more promising results than RF and SVM. Thus, the model performed well in terms of all evaluation metrics. Decision trees proved to have performed well since they could handle datasets with outliers.  
More results were generated using ensemble methods. The bagging model with DT achieved the best results in terms of accuracy and precision performance metrics. The AdaBoost model with DT also achieved better results than the combination of RF and SVM, which means the combination of AdaBoost with DT significantly improved the model's performance. Additionally, the stacking model, with base estimators as RF, DT, and SVM and the final estimator defined as LR, has shown more significant improvement. In terms of performance, considering accuracy, precision, recall, and f1-score, the model best performed compared with the other models. The results revealed that DT could improve the performance of different ensemble model combinations when used individually and as a weak learner.  
A typical analysis example of the state of traffic involving the three vectors/classes is as follows: in 2016, the volume of vehicles travelling on the freeway was recorded as 4987 on a Monday from 06:00, travelling at 87 km/h, resulting in an unstable traffic state.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Ensemble Model**} & \multicolumn{5}{c}{**Metrics**} \\ \cline{2-6}  & **Accuracy** & **Precision** & **Recall** & **f1-Score** \\ \hline Model 1 & RF & 0.961 & 0.981 & 0.912 & 0.941 \\ \hline Model 2 & DT & 0.983 & 0.992 & 0.983 & 0.992 \\ \hline Model 3 & SVM & 0.972 & 0.981 & 0.972 & 0.971 \\ \hline Model 4 & Bagging (RF) & 0.963 & 0.972 & 0.912 & 0.931 \\ \hline Model 5 & Bagging (DT) & 0.982 & 0.972 & 0.962 & 0.963 \\ \hline Model 6 & Bagging (SVM) & 0.971 & 0.980 & 0.972 & 0.983 \\ \hline Model 7 & AdaBoost (RF) & 0.961 & 0.980 & 0.913 & 0.942 \\ \hline Model 8 & AdaBoost (DT) & 0.997 & 0.960 & 0.980 & 0.990 \\ \hline Model 9 & AdaBoost (SVM) & 0.521 & 0.510 & 0.352 & 0.262 \\ \hline \multirow{2}{*}{Model 10} & LR [Stacking (DT, RF and SVM)] & 0.997 & 0.990 & 0.982 & 0.982 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Summary of overall results.  
The unstable traffic state is due to different factors such as commuters travelling to work, road incidents, and other factors. Then, in 2018, the volume of vehicles on the freeway was recorded as 942 travelling at 108 km/h on a Friday from 23:00, which is classified as a bistable traffic state. Furthermore, in 2016, the volume of vehicles on the freeway was recorded as 326, on a Thursday from 05:00, travelling at 110 km/h, classified as stable traffic. During peak hours, traffic turns unstable since most commuters need to get to their different workplaces. Then, during working weekdays in the morning, traffic turns unstable from 06:00 to 08:00 and in the afternoon from 15:00 to 18:00. The analysis shows various peak and off-peak hours to enable commuters to plan for future travelling.