# Casualty Analysis of the Drivers in Traffic Accidents in Turkey: A CHAID Decision Tree Model
## 3 Material and Method
### Methodology  
Decision Trees are powerful and widely used methods for classification- and prediction-related studies. The appeal of tree-based methods is largely because, unlike neural networks, Decision Trees produce rules. A Decision Tree represents a series of questions and answers. They are obtained with the root at the top and the leaves at the bottom. The attribute at the root is the attribute that has the strongest relationship with the output (target) variable. In Decision Trees, a record in the dataset enters the tree from the root node, and a test is applied to determine which sub-node it will encounter next. There are different algorithms for this test. When choosing suitable algorithms, the main point is to determine the best classification algorithm. This test and the process of moving to the sub-node are repeated until the leaf reaches the terminal node [32].  
Decision trees are known to be well designed for making classification predictions in categorical data. Since they do not require assumptions, such as normality, the classification methods are easy to apply for multidimensional data processing to analyse the categorical data for the severity estimation of traffic accidents [7]. As stated earlier, all dependent and independent attributes in this research are of the categorical data type (non-categorical ones were also converted to categorical type). Chi-Squared Automatic Interaction Detection (CHAID), one of the decision trees, was chosen as the analysis algorithm. This method was proposed and improved by [PERSON] [33] to detect statistical relationships through the chi-squared test based on the inspiration from the Automatic Interaction Detection method (AID) which is a popular technique suggested by [PERSON] and [PERSON] [34; 35] and used in many fields [36]. It is used as a classification tool because it creates a tree while detecting statistical relationships.  
The reason that CHAID is preferred in this study over other decision trees is that it stops the growth of the tree without overfitting. In this sense, the CHAID tree differs from other trees by producing more splits than two-fold divisions. In this way, some classes are prevented from being aggregated, resulting in obtaining fewer clear trees.  
The relatively high credibility and accuracy of the CHAID algorithm, along with having a good mathematical theoretical basis in branch calculation, stem from the fact that it employs the chi-square detection method in statistics. The chi-square test is used to select the independent attributes affecting the dependent attribute mostly in terms of the principle of local optimization. Then, the CHAID algorithm generates equal amounts of leaf nodes according to the number of categories of the independent attribute simply due to the fact that the independent attributes may have many different categories. This makes the CHAID algorithm produce a multi-fork tree.  
It should also be mentioned that the CHAID algorithm employs the \"pre-pruning method\". In this method, \"pruning\" is applied earlier than dividing and generating the decision tree. In this way, it would be possible not only to reduce the training and testing time overhead of the CHAID decision tree but also to decrease the risk of overfitting. The risk of underfitting the CHAID algorithm, on the other hand, may even be further reduced. Additionally, the accuracy might be improved as long as the number of prunings is preserved in a good interval on the condition that a sufficient amount of data with mostly categorical attributes are available.  
All these explained strong sides, along with the fact that each class appears in a different node, in addition to the possibility of obtaining clearer rules with CHAID, justify why this tree algorithm was used in this study.