## 3 Application of the Proposed Methodology
### The Model Experiments Result  
We use the grid search method for parameter optimization. The parameter setting range is as Table 7.  
The obtained optimal parameter combinations are shown in Table 8.  
The results obtained with the optimal parameters on the test dataset are presented in Table 9 below. In addition, we have incorporated two widely used machine learning models, namely support vector regression (SVR) [42] and linear regression (LR) [43], to further compare and evaluate the performance of our proposed model in this study. The XGBoost model outperforms other models in all metrics, making it the final model selected for our study. Furthermore, the performance of the XGBoost model (MSE = 0.002) \begin{table}
\begin{tabular}{c c c c} \hline \hline
**RF Result** & **Label Encoder** & **One-Hot Encoder** & **Target Encoder** \\ \hline MSE & 0.003889 & 0.003415 & 0.003937 \\ RMSE & 0.062341 & 0.058439 & 0.062747 \\ MAE & 0.022645 & 0.022282 & 0.022700 \\ R\({}^{2}\) & 0.999870 & 0.999886 & 0.999868 \\ \hline
**XGB Result** & **Label Encoder** & **One-Hot Encoder** & **Target Encoder** \\ \hline MSE & 0.002177 & 0.002160 & 0.002178 \\ RMSE & 0.046662 & 0.046471 & 0.046667 \\ MAE & 0.017940 & 0.017828 & 0.017942 \\ R\({}^{2}\) & 0.999927 & 0.999928 & 0.999927 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: RF results for different encoder methods and XGBoost results for different encoder methods. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **RF Model** & **XGBoost Model** \\ \hline n\_estimators & [100, 200, 300, 400, 500] & [200, 250, 300] \\ max\_depth & [10, 15, 20, 25, 30, 35, 40, 45, 50] & [10, 20, 30, 40, 50] \\ max\_features & [3, 4, 5] & \(\backslash\) \\ learning\_rate & \(\backslash\) & [0.1, 0.01, 0.001] \\ \hline \hline \end{tabular}
\end{table} 
Table 7: The parameter setting range in the RF model and XGBoost model. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **RF Model** & **XGBoost Model** \\ \hline n\_estimators & 500 & 300 \\ max\_depth & 35 & 40 \\ max\_features & 4 & \(\backslash\) \\ learning\_rate & \(\backslash\) & 0.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: The optimal parameter combinations. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **RF Model** & **XGBoost Model** \\ \hline n\_estimators & 500 & 300 \\ max\_depth & 35 & 40 \\ max\_features & 4 & \(\backslash\) \\ learning\_rate & \(\backslash\) & 0.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: The model result comparison. surpasses that of the IDM model (MSE = 0.009) and S3 model (MSE = 0.006) based on the HighD dataset [33]. These findings highlight the effectiveness of the XGBoost model in predicting car-following behavior and demonstrate its superiority over other models reported in the literature. More details are shown in Table 9.  
Then, we utilized feature importance results in the XGBoost model to further understand the impact of heterogeneity factors on car-following behavior. In the XGBoost model, the cover type feature importance measures the number of times a feature is used as a split point in a tree model multiplied by the average coverage value (cover) of that feature across all split points. The coverage value indicates the number of samples covered by the feature when it is selected as a split point. The importance of the cover-type features reflects the contribution of a feature to the model, that is, the degree of influence of the feature on the sample points. The larger the coverage value, the more times the feature is selected as a split point in the tree model and the more sample points it covers in each split, indicating a greater contribution of the feature to the model. Figure 7 displays the important feature results for our model. Features are sorted in descending order according to their importance scores, and the top three features are all related to heterogeneity factors (middle-flow: 0.3388; Car-Car: 0.2672; and Truck-Truck: 0.1202).