## 2 Materials and Methods
### Methods
#### 2.2.2 Classification Model  
To select the best predictive classification model, six machine learning models were compared. Furthermore, to improve the performance of the model, the k-fold cross-validation method, which improves the generalization performance of the model, and the grid search (GS) method, which finds the optimal hyperparameter, were used.  
K-Nearest Neighbor  
KNN [24] is a method for allocating the most frequent class among the \(k\) instances closest to Instance \(x\). It uses a distance metric to determine the nearest instance, and the Euclidean distance is primarily used [25].  
The support vector machine (SVM) method is a technique used to create a boundary between points displayed in a multidimensional space [26]. It aims to optimally and linearly separate a space called a hyperplane through high-dimensional transformation using nonlinear mapping. SVMs can be used to learn models for almost any purpose, including classification and numerical prediction. In this study, a hyperplane was used as a classifier to determine whether an accident occurred. The goal is to find the optimal hyperplane with the maximum margin hyperplane that separates the distance between  
Figure 2: The overall workflow of the conducted study.  
the two groups as far as possible. This maximum possible margin could provide high predictive accuracy.  
Random Forest  
RF [27] is a method that expands the decision tree method, which expresses decision-making rules in the form of a tree, to the idea of bagging [28]. To improve generalization performance, RF applies the ensemble method to the results of multiple trees generated by the collection of random variables to prevent problems with overfitting and large variance in individual trees. In the ensemble process, the average is primarily used for prediction, and voting is used for classification.  
Extremely Randomized Trees  
Extra-trees [29] is a tree-based ensemble method that applies the ensemble method to unpruned trees according to the classical top-down procedure. In contrast to other tree-based ensemble methods, the cutoff, which is a criterion for splitting nodes, is selected completely at random, and the entire sample is used instead of a portion of the sample selected using the bootstrap method.  
eXtreme Gradient Boosting  
XGBoost [30] is a boosting technique in which the previous model affects the next model, which is unlike bagging, which uses several models that are independent of each other. Gradient boosting [31], a representative boosting technique, is applied to enable parallel processing to reduce the amount of computation and increase computation speed. It has the advantage of preventing overfitting and sparse data.  
Light Gradient Boosting Machine  
LightGBM [32] uses two techniques, gradient-based one-side sampling (GOSS) and exclusive feature bundling (EFB), to improve performance in terms of efficiency and scalability of the gradient-boosting decision tree (GBDT). LightGBM showed almost the same performance as the existing GBDT, allowing it to train more than 20 times faster and using GOSS and EFB to manage large data objects and large variables, respectively. Moreover, by improving these two techniques, it is possible to achieve much better performance than XGBoost in terms of calculation speed and memory usage.  
K-fold cross-validation [33] divides the dataset into \(k\) mutually exclusive folds of approximately the same size, trains the model with \(k-1\) folds of data, and evaluates the model's performance with the other fold. K-fold cross-validation has a total of \(k\) evaluation results, the average of which is used as the final evaluation result.