# A Comparative Study of Ensemble Models for Predicting Road Traffic Congestion
## 4 Empirical Framework
### Road Traffic Congestion Dataset  
In this study, the Gauteng Province (GP) road traffic flow dataset was used [51]. The dataset obtained from Mikros Traffic Monitoring (MTM) was used for constructing a vehicle traffic prediction model [52]. MTM is one of the Department of Transport-contracted agencies that collect data directly from the freeways in South Africa. The agency uses data loggers to collect data from the freeways and cameras to monitor traffic volumes on the GP freeways. MTM does not use these datasets to predict road traffic conditions [52]. Approval to conduct the study and collect real-life RTC datasets was attained from MTM and the University of Johannesburg ethics committee (Ethics code: 2020 SCiiS04 and Date: 2 March 2020). During data preparation, the collected data was cleaned, normalised, and dealt with missing values and statistical analysis as presented in Figure 1. More so, the traffic flow dataset was categorised into three classes: _Freeflow_, which means that vehicles are travelling at speeds larger than 109 km/h; _moderate_ or _Bound flow_, meaning vehicles are entering a bistable traffic state travelling on speeds between 100 km/h and 109 km/h; and _Congested_, meaning travelling at speeds less than 99 km/h. The dataset informed the class categorisation, which lacked the classification of different vehicles involved. The total numbers involved different vehicles that used the specific location. The obtained summary of the dataset is presented in Table 3 and has incorporated features such as _the TravelTime_, _TrafficVolume_, _AverageSpeed_, date, and year in Table 4. This paper used data for weekdays only and excluded holiday datasets since they are just simple repeating patterns and are not affecting anyone. Table 3 contains the summary of the overall road traffic congestion dataset. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**No.** & **Feature** & **Description** & **Data Type** \\ \hline
1 & TravelTime & Refers to the time of day vehicles were travelling & Numeric \\ \hline
2 & AverageSpeed & Refers to the speed at which the vehicles were moving & Numeric \\ \hline
3 & TrafficVolume & Refers to the number of vehicles on the freeway or road & Numeric \\ \hline
4 & Date & Date on which different instances were captured & Date \\ \hline
5 & Year & Different years in which the road traffic dataset was captured & Year \\ \hline  & TrafficState & Description & \\ \hline
1 & Congested & Refers to the vehicles being in an unstable traffic state & Ordinal \\  & & (99 km/h going down) & \\ \hline
2 & Moderate or Bound flow & Refers to the vehicles moving towards bistable traffic state & Numeric \\  & & (100–109 km/h) & Numeric \\ \hline
3 & Freeflow & Refers to the vehicles moving freely at the maximum required & Numeric \\  & & speed (110 km/h going up) & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: RTC features and classes descriptions. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Dataset** & **Instance** & **Features** & **Classes** & **Missing Values** & **Years** \\ \hline Road traffic congestion & 50,313 & 5 & 3 & 15,869 & 7 \\ \hline  & & \multicolumn{4}{c}{Dataset Split} & \\ \hline Train set (80\%) & 27,555 & 5 & 3 & - & 7 \\ \hline Test set (20\%) & 6889 & 5 & 3 & - & 7 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Summary of the road traffic congestion dataset. Table 4 contains several features and their descriptions and data type values. These parameters were used to design the RTC predictive model. The dataset contained 50,313 instances with missing values being removed using listwise deletion. The method does not consider missing values compared to other missing data methods dealing with missing values in the dataset. The application of LD to the dataset meant deleting the missing values from the dataset completely, reducing the dataset, which remained with 34,444 instances, and it was split into training and testing sets, as shown in Table 3.  
Various studies implemented imputation methods and LD, such as work by [53; 54].