# Weight Feedback-Based Harmonic MDG-Ensemble Model for Prediction of Traffic Accident Severity
## 3 Weight Feedback Based Harmonic MDG-Ensemble Model for Predicting Traffic Accident Severity
### Variable Selection According to Importance Using Mean Decrease in Gini Coefficient  
Traffic accidents are influenced by diverse factors, such as speed, poor driving, and road conditions. Traffic data include the variables unnecessary for severity prediction or weakly influential variables. Therefore, accurately to predict traffic accident severity, influential and highly important variables are selected. Since pre-processed data include categorical data, it is difficult to select variables based on regression analysis. For this reason, a modeling method according to data types must be developed [25; 26]. In this study, the importance of variables is derived by applying the decision tree-based random forest. Variable importance refers to selecting independent variables that are important for predicting changes in independent variables [27; 28]. For variable selection, the MDG coefficient which is the mean of the decrease in impurity values for specific variables in a decision tree-based model [29] was used. Traffic accident severity was set as a dependent variable to extract its MDG coefficient and the other 12 variables were set as independent variables [30; 31]. The MDG coefficient for each of the independent variables was derived by a classifier. The relative importance of the dependent variable was determined in comparison to the MDG coefficient. Figure 5 shows the variable importance using the MDG coefficient. The horizontal axis represents the mean decrease in Gini. The vertical axis represents the independent variables of traffic accident information data.  
However, since Korea has four distinct seasons, it is necessary to consider the variables for year and month. In addition, traffic congestion occurs according to the time of commute to work, and the accident rate is high. Therefore, it is necessary to consider time. As a result of the variable importance when using the MDG coefficient in Figure 5, relatively low importance values are also extracted. If the value of the MDG coefficient is less than 500, effective analysis is not possible because the number of variables selected as MDGs decreases rapidly. therefore, a cut-off threshold of 500 was established. Table 2 shows the final result of the variable importance using the MDG coefficient.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**No** & **Variable Name** & **Data Type** & **Category** & **Description** \\ \hline \multirow{3}{*}{1} & Traffic Accident & \multirow{3}{*}{Categorical} & 1 & Slight-moderate \\  & & Severity & 2 & Serious \\  & & & 3 & very serious \\ \hline \multirow{3}{*}{2} & \multirow{3}{*}{Year} & \multirow{3}{*}{Categorical} & 2012 & \multirow{3}{*}{Year of accident} \\  & & & 2014 & \\  & & & 2015 & \\  & & & 2016 & occurrence \\  & & & 2017 & \\  & & & 2018 & \\ \hline \multirow{3}{*}{12} & \multirow{3}{*}{Violation\_law} & \multirow{3}{*}{Categorical} & 0 & Pedestrian’s negligence \\  & & & 1 & Driver’s violation of law \\  & & & 2 & Poor maintenance \\ \hline \multirow{3}{*}{13} & \multirow{3}{*}{Road\_type} & 0 & Crossroad \\  & & & 1 & Others/Undefined \\ \cline{1-1}  & & & 2 & One way only \\ \cline{1-1}  & & & 3 & Parking lot \\ \cline{1-1}  & & & 4 & Railroad crossing \\ \hline \hline \end{tabular}
\end{table}
Table 1: Pre-processing results of Traffic accident information data.  
As shown in Table 2 of variable's importance, eight variables were extracted. The MDG coefficient of Hour is 1000.54. Consequently, for traffic accident data, \"Hour\" is judged to be the important variable in terms of severity classification. This is because accidents often occur at right or during rush hours [3; 24].