## 5 Shapley Explanation for the Relationship between Micro-Behavior and Geometric Design
### RF-SHAP Analysis of Mirco-Behavior on Combined Curves
#### 5.2.1 Speed Change Behavior on Downslope and Sag Curve  
In this study, speed differences below the 7.5 th percentile are defined as the threshold for substantial speed reduction behavior, while those exceeding the 92.5 th percentile are considered as the threshold for substantial speed increase behavior. The RF model utilizes all values representing substantial speed reduction and increase as the dependent variable data, with ten geometric design parameters serving as independent variables.  
(1) Downslope Curve  
The _MAE_ of the RF model is 5.861. Figure 8 displays the SHAP values of the downslope curves' geometric design parameters.  
Figure 7: The heat map of combined curves’ geometric design parameters.  
Furthermore, Figure 8 demonstrates that among all geometric design parameters included in downslope curves, the SHAP value of \(R\) is the highest, indicating that \(R\) has the greatest impact on the speed variation behavior of vehicles on downslope curves. Following this, other influential factors include \(L_{cc}\), \(L_{dt}\), \(\Delta G\), and \(G_{mean}\). The smallest SHAP value for \(L_{at}\) is observed upon entering a downslope curve.  
A prior study demonstrated that speed was impacted by adjacent alignments [17]. The study also considered the geometric design parameters of the preceding 300 m segment and the following 300 m segment of the combined curve. The RF model exhibited a _MAE_ of 5.55, and Figure 10 displays the SHAP values of the geometric design parameters for the adjacent alignment of the downslope curve.  
Figure 10 shows that the SHAP values for \(\Delta C_{p}\) in the downslope curve are the highest, at 2.38, indicating a significant influence on the speed change behavior of downslope curves. This is followed by \(\Delta G_{f}\) for the downslope curve, with an SHAP value of 0.3951, which may be due to the following slope change affecting driver visibility. \(\Delta C_{f}\) and \(\Delta G_{p}\) have smaller impacts on the speed behavior of downslope curves.  
(2) Sag Curve  
The _MAE_ of the RF model is 5.68. Figure 9 displays the SHAP values of geometric design parameters for sag curves.  
Figure 8: The SHAP values for geometric design parameters of downslope curves.  
Figure 10: The SHAP values for adjacent alignment geometric design parameters of downslope curves.  
Figure 9: The SHAP values for the geometric design parameters of sag curves.  
According to Figure 9, the SHAP values for \(L_{dt}\) are the highest for sag curves, indicating that it has the most significant impact on speed change behavior in terms of geometric design parameters. After \(L_{dt}\), the next most influential factors are \(L_{cc}\), \(R\), \(G_{mean}\), and \(\Delta G\). The SHAP value for \(L_{at}\) is the smallest.  
As demonstrated in Figure 11, which showcases the SHAP values of geometric design parameters adjacent to sag curves in alignment, the RF model's _MAE_ is 5.74.  
Figure 11 reveals that on sag curves, the SHAP values for \(\Delta G_{f}\) have the highest impact on the speed change behavior of sag curves, with a value of 0.61. The following curvature change (\(\Delta C_{f}\)) has an SHAP value of 0.32, meaning it also has an impact on speed behavior, but to a lesser extent. Additionally, \(\Delta C_{p}\) and \(\Delta G_{p}\) exhibit an impact on sag curve speed behavior, but their effect is not as pronounced.