# Traffic Conflict Prediction for Sharp Turns on Mountain Roads Based on Driver Behavior Patterns
## 2 Materials and Methods
### Methodological Framework
#### 2.2.1 Principle of the FP-Growth Algorithm  
Understanding the links between driving practices and traffic disruptions is fundamental for automating safety measures for mountainous road usage. Pattern recognition, such as associational rule mining, offers a systematic method to uncover associated driving behaviors that may contribute to accidents. In the context of collision prediction analysis that employs behavioral pattern mining, we chose the FP-Growth algorithm as it is best known for its speed when processing complicated behavioral data. Traditional methods of rule mining, such as Apriori, often lead to computation overload due to multiple passes through their databases, along with the formation of expansive candidate sets. In our case, where we were dealing with over forty-seven thousand sequences of driving behavior intentions and conflicts, FP-Growth allowed for quicker processing times because it builds a condensed tree structure that does not lose materials for analysis--this is useful in keeping analytical strength when dealing with enormous amounts of data. Studies conducted before were proposed by [PERSON]. FP-Growth has been shown to combine the riskiest driving behaviors in urban settings, but it does apply to mountainous road contexts [39], which clearly outlines how FP-Growth has shown great value in combining the riskiest behaviors in urban driving environments. In urban road environments, there are possibilities of switching from reactive measures to strategies that preemptively mitigate collisions. FP-Growth has demonstrated its ability to combine the riskiest driving behaviors in urban road environments, though limited applications exist in mountainous context roads. By pulling out behavior driving patterns that are significantly related to accident conflict types, this approach enables efforts to (1) measure and identify the most dangerous behavioral combinations, (2) quantify their relative risk levels, and (3) take a proactive approach to getting rid of the causes instead of the effects of accidents [40; 41]. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & **Conflict Sample** & **Normal Sample** & **Total** & **Ratio** \\ \hline Training Set & 3886 & 34,476 & 38,362 & 80\% \\ Validation Set & 485 & 4310 & 4795 & 10\% \\ Test Set & 486 & 4309 & 4795 & 10\% \\ Total & 4857 & 43,095 & 47,952 & 100\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Dataset partitioning. An FP-Tree (Frequent Pattern Tree) is a compact data structure used to construct and analyze driving behavior data and to discover frequent patterns within them. The FP-Growth algorithm employs frequent growth techniques to analyze data patterns within driving behavior. In this context of traffic safety analysis, driving behaviors such as speeding, short following distance, and lane changing, which co-occur in certain driving situations that result in conflicts, can be systematically analyzed with the use of the FP-Tree algorithm. For our analysis of drivers' behaviors, the algorithm follows the procedure below:  
Initial Data Scan: The algorithm scans the driving behavior-traffic conflict dataset and looks for certain behaviors that appear frequently enough to be considered valid (exceed the minimum support threshold). If such behaviors are valid, they are ordered by their support counts within a frequent item header list. For example, \"speeding\" (TS\(\uparrow\)) in our dataset had an occurrence rate of 85% and \"short headway\" (LK\(\downarrow\)) had a frequency of 72%. FP-Tree Construction: The algorithm adds every driving behavior sequence separately into the FP-Tree as it builds the FP-Tree, which results in the creation of a dataset representation via compression of common prefixes. In our implementation, paths in the tree correspond to the sequence of driving behaviors that take place prior to a certain traffic conflict.