# 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
### Weight Feedback Based Harmonic MDG-Ensemble Model  
The data for predicting traffic accident severity are numerical or categorical. Accordingly, it is important to build an appropriate model to analyze these data-types efficiently. Configurable models include machine learning-based models or deep learning-based models. In a machine learning-based model, the user directly inputs the features of the data and finds the features, and the model finds pattern learning by itself. Accordingly, new knowledge and information can be obtained. On the other hand, in the case of a deep learning-based model, the model performs self-learning without user intervention from feature extraction to pattern discovery. It also extracts results from complex and vast data. However, since it has the characteristics of a black box, there is a disadvantage in that it is possible to predict the analysis result of the data through the result without an intermediate process. In this paper, in order to improve the efficiency of classification, a model is constructed by extracting variables necessary for analysis through MDG coefficients. Therefore, a machine learning-based model is constructed. To improve the performance of multi-categorical classification, classification algorithms, such as decision tree, K-nearest neighbor (KNN), and SVM, are merged to improve the performance of multi-categorical classification. For an ensemble model, single models are merged according to specific criteria, and a new model is generated for the same dependent variable [32; 33]. The proposed weight feedback based harmonic MDG-ensemble model uses the variables drawn using the MDG coefficient. Figure 6 shows the structure of the weight feedback-based harmonic MDG-ensemble model. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Variable Name** & **MDG** & **Variable Name** & **MDG** \\ \hline Hour & 1000.54 & Date & 665,693849 \\ Casualty\_type & 1302.854 & Violation\_law & 557,599871 \\ Month & 1058.541 & Light & 667,584 \\ Attacker\_type & 1512.122 & Location & 1256.67162 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The final result of the variable importance using the MDG coefficient. Figure 5: Variable importance using the MDG coefficient. In Figure 6, the model has three steps. The first is to construct an ensemble model. The pre-processed traffic accident data is split into 70% of training data, 20% of test data, and 10% of verification data. Various single classification models are trained with the training data. Afterward, the ensemble model is generated using the weighted-voting ensemble method that applies these single models. The second step compares the actual and predicted values of the ensemble model to the test data. If the actual and predicted values match, this increases the \"Correct\" of every single model and the predicted value is the same as that of the ensemble model. Conversely, if the actual and predicted values mismatch, this increases the \"Incorrect\" of every single model and the predicted value matches that of the ensemble model. In the last step, the MDG values of the independent variables used in every single model, \"Correct\" and \"Incorrect\" are applied to extract the weight of every single model, and thereby weight feedback is provided. Thus, the classification performance of the ensemble model is improved. For weight feedback, a harmonic mean is applied to the MDG values. The distribution of the MDG values is biased. Therefore, the product of the MDG values has no special meaning, such as the ratio. To solve the problem, the harmonic mean is applied to the MDG coefficient. The arithmetic mean is used when variables have common criteria [34]. In traffic accident data, however, factors such as time, month, position, year, and type of accident have no common criteria. Therefore, this division is not applied to calculate the mean. The geometric mean is used when it is possible to analyze the ratio of common change in variables [35].