# 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  
Data coding: First, the traffic conflict data are encoded to extract the type and severity of the conflict:  
(Rear-End, RE): {RE-Min, RE-Mod, RE-Sev}  
(Lane-change, LC): {LC-Min, LC-Mod, LC-Sev}  
(Cross, CR): {CR-Min, CR-Mod, CR-Sev}  
Here, (Rear-End, RE) denotes a rear-end collision; Min, Mod, and Sev signify the varying degrees of severity associated with such incidents, namely, minor collisions, moderate collisions, and severe collisions. {RE-Min} indicates a minor rear-end collision, {RE-Mod} refers to a moderate rear-end collision, and {RE-Sev} represents a severe rear-end collision. (Lane-change, LC) pertains to lane-change conflicts; {LC-Min}, {LC-Mod}, and {LC-Sev} correspondingly denote minor, moderate, and severe lane-change conflicts. (Crossing, CR) signifies intersectional conflicts; {CR-Min}, {CR-Mod}, and {CR-Sev}, respectively, illustrate the spectrum of severity from minor to moderate to severe crossing conflicts. Construct a composite transaction: Splice the encoded conflict events with the corresponding driving behavior sequence to form a \"driving behavior-traffic conflict\" composite transaction. Frequent item set mining: Use the FP-Growth algorithm to mine frequent item sets. Association rule generation: Generate association rules based on frequent item sets. Based on a comprehensive synthesis of data derived from driving simulation experiments and real-world road observations, consider the following 10 sample composite transactions:  
\(\{\)TS\(\uparrow\), \(\text{LK}\)\(\downarrow\),LC\(\uparrow\), LC-Sev\(\}\)  
\(\{\)TS\(\uparrow\), \(\text{LK}\)\(\uparrow\), HS\(\uparrow\), RE-Mod\(\}\)  
\(\{\)LK\(\downarrow\), AS\(\uparrow\), CR-Sev\(\}\)  
\(\{\)TS\(\uparrow\), \(\text{LK}\)\(\downarrow\), RE-Min\(\}\)  
\(\{\)TS\(\uparrow\), \(\text{LK}\)\(\uparrow\), LC\(\uparrow\), LC-Mod\(\}\)  
\(\{\)TS\(\uparrow\), \(\text{LK}\)\(\downarrow\), LC\(\uparrow\), LC-Sev\(\}\)  
\(\{\)LK\(\downarrow\), AS\(\uparrow\), CR-Sev\(\}\)  
\(\{\)TS\(\uparrow\), \(\text{LK}\)\(\uparrow\), HS\(\uparrow\), RE-Mod\(\}\)  
\(\{\)TS\(\uparrow\), \(\text{LK}\)\(\downarrow\), RE-Min\(\}\)  
\(\{\)TS\(\uparrow\), LC\(\uparrow\), LC-Min\(\}\)  
where TS\(\uparrow\) indicates speeding, \(\text{LK}\)\(\downarrow\) indicates a short headway, LC\(\uparrow\) indicates frequent lane changes, HS\(\uparrow\) indicates sudden braking, and AS\(\uparrow\) indicates rapid acceleration. Step 1: Build the FP-Tree  
First, count the support of each item, as presented in Table 8.  
Then, build the FP-Tree in descending order of support, as shown in Figure 10.  
Step 2: Mining frequent patterns from the FP-Tree  
First, take LC-Sev as an example. Its conditional pattern base is \(\{\)TS\(\uparrow\), \(\text{LK}\)\(\downarrow\), LC\(\uparrow\):2\(\}\). Then, through recursive mining, the following frequent patterns are obtained. \(\{\)TS\(\uparrow\), \(\text{LK}\)\(\downarrow\), LC-Sev\(\}\):2 \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline
**Item** & **TS\(\uparrow\)** & **LK\(\downarrow\)** & **LC\(\uparrow\)** & **LK\(\uparrow\)** & **HS\(\uparrow\)** & **AS\(\uparrow\)** & **LC-Sev** & **RE-** & **CR-Sev** & **RE-Min** & **LC-** & **Mod** & **LC-Min** \\ \hline Support count & 5 & 4 & 3 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 1 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Support statistics for each item. Figure 10: FP-Tree. [TS\(\uparrow\), LC\(\uparrow\), LC-Sev]:2  
[LK\(\downarrow\), LC\(\uparrow\), LC-Sev]:2  
[TS\(\uparrow\), LC-Sev]:2  
[LK\(\downarrow\), LC-Sev]:2  
[LCT\(\uparrow\), LC-Sev]:2  
[LK\(\uparrow\), LC-Sev]:2  
[Step 3: Generate association rules.