# Traffic Conflict Prediction for Sharp Turns on Mountain Roads Based on Driver Behavior Patterns
## 3 Results
### Association Rule Mining Results
#### 3.2.2 Algorithm Implementation Steps
For instance, for the rule {TS\(\uparrow\), LK\(\downarrow\), LC\(\uparrow\)} \(\rightarrow\) {LC-Sev]:  
Support:  
\[\sup\)(TS \(\
earrow\), LK \(\
earrow\), LC \(\
earrow\), LC-Sev) = \(\frac{2}{10}=0.2\]  
Confidence:  
[TSS \(\
earrow\), LK \(\
earrow\), LC \(\
earrow\)-LC-Sev) = \(\frac{\sup\)(TS \(\
earrow\), LK \(\
earrow\), LC \(\
earrow\), LC-Sev) = \(\frac{2/10}{2/10}=1\)  
Degree of lift:  
[TSS \(\
earrow\), LK \(\
earrow\), LC \(\
earrow\)-LC-Sev) = \(\frac{\text{conf}(\text{TS \
earrow\), LK \(\
earrow\), LC \(\
earrow\)-LC-Sev)}}{\sup\)(LC-Sev) = \(\frac{1}{2/10}=5\)  
This rule meets the requirements of the minimum support and minimum confidence thresholds. Frequent pattern mining aims to identify those driving behavior combinations that frequently co-occur and are closely associated with traffic conflicts, derived from a vast array of driving behavior and traffic conflict data. These combinatorial patterns are crucial for understanding the underlying causes of accidents, predicting traffic conflicts, and formulating targeted safety measures. By excavating frequent patterns, one can uncover behavioral combinations such as \"speeding + short headway distance + frequent lane changes\", which exhibit a strong correlation with specific types and severities of traffic conflicts. This directly supports the research objective of reducing traffic accidents on mountainous roads and enhancing overall road safety conditions. It assists transportation management authorities in pinpointing key driving behaviors that warrant monitoring and intervention, thereby facilitating proactive prevention at the source of traffic incidents. In the FP-Growth algorithm, recursive mining serves as a pivotal step in uncovering frequent patterns. Upon the completion of constructing the FP-Tree, the algorithm embarks on its exploration by commencing with the least frequent behaviors and proceeding in reverse order. Taking \"LC-Sev\" (severe lane-change conflict) as an illustrative example, we first identify its conditional pattern base--this encompasses other driving behavior sequences associated with \"LC-Sev\", along with their respective occurrence frequencies, such as {TS\(\uparrow\), LK\(\downarrow\), LC\(\uparrow\):2}. Subsequently, a conditional FP-Tree is constructed based on this conditional pattern base; further mining is then conducted within this newly established tree structure. The process of recursive mining perpetually reiterates this cycle, yielding new frequent patterns at each iteration. Each identified frequent pattern represents a potential combination of driving behaviors that could precipitate specific traffic conflicts. Through recursive mining, the algorithm adeptly extracts all meaningful frequent patterns from the data comprehensively and profoundly. These patterns illuminate the latent relationships among various driving behaviors and their correlations with traffic conflicts--providing crucial data support for subsequent endeavors to generate association rules, assess risks, and formulate safety strategies. After the calculation, the following key association rules are obtained:  
[TS\(\uparrow\), LK\(\downarrow\), LC\(\uparrow\)] \(\rightarrow\) {LC-Sev], sup = 0.2, conf = 1, lift = 5  
[TS\(\uparrow\), LK\(\uparrow\), HS\(\uparrow\)] \(\rightarrow\) {RE-Mod], sup = 0.2, conf = 1, lift = 5\(\{\text{LK}\text{\(\downarrow\), AS}\text{\(\uparrow\)}\rightarrow\)[CR-Sev], sup = 0.2, conf = 1, lift = 5 \(\{\text{TS}\text{\(\uparrow\), LK}\text{\(\downarrow\)}\rightarrow\)[RE-Min], sup = 0.2, conf = 0.5, lift = 2.5  
The above rules reflect the strong association between different combinations of driving behaviors and specific types of traffic conflicts. For example, Rule 1 states that a combination of speeding, short headway, and frequent lane changes is likely to result in severe lane-change conflicts; Rule 2 indicates that a combination of speeding, long headway, and sharp braking is likely to cause moderate rear-end collisions.