## 4 Conclusions and Discussion  
In summary, this paper demonstrates the superiority of incorporating heterogeneity factors for the car-following model. Firstly, the findings reveal distinct car-following behaviors under different combinations of vehicles and traffic flows. The drivers in the Car-Truck, Truck-Car, and Truck-Truck combinations exhibit a higher level of risk perception, characterized by longer time headway (THW) and lower speeds. These results align with previous research on heterogeneity analysis. Secondly, experiments were conducted to identify the optimal encoding method for incorporating heterogeneity factors, with one-hot encoding found to be the most suitable approach. In the end, the proposed model (MSE = 0.002181, R\({}^{2}\) = 0.999927), incorporating heterogeneity factors, outperformed the model that did not consider these factors (MSE = 0.003530, R\({}^{2}\) = 0.999881) as well as a theory-driven car-following model (MSE = 0.006). The influence of heterogeneity factors on car-following behavior was quantified through feature importance scores, with middle-flow, Car-Car, and Truck-Truck factors ranking highest. This study provides valuable insights into the intersection of heterogeneity and car-following modeling. It is also a meaningful attempt at the model chosen in this paper. Currently, data-driven models based on deep learning are mainstream, but they are lacking in latency and interpretability. Traditional theory-driven models cannot easily incorporate other variables, like machine learning models. This paper chooses the ensemble learning method based on the decision tree. The experimental results prove that the model in this paper can achieve high accuracy and has a certain degree of interpretability, and there is no doubt that the delay is lower than  
Figure 11: Prediction trajectory of the Car-Car combination under different traffic flows.  
Figure 10: Prediction trajectory of the Car–Truck combination under different traffic flows.  
the deep learning model. This paper provides a basis for the application of the ensemble learning method based on a decision-tree model in car-following model research.  
Moving forward, there are several avenues for future research. Due to limitations in the dataset, this study focused solely on car-following models in highway scenarios. However, urban scenarios require consideration of additional factors, such as vehicle-to-vehicle interaction and environmental information. Thus, future research could explore the development of car-following models that incorporate heterogeneity factors, specifically in urban scenes. This would contribute to a more comprehensive understanding of car-following behavior and its implications in diverse driving environments.  
Conceptualization, K.Z., X.Y. and J.W.; methodology, X.Y.; software, K.Z., M.L. and Y.Z.; validation, K.Z.; formal analysis, K.Z. and X.Y.; investigation, X.Y.; resources, K.Z. and X.Y.; data curation, K.Z., M.L. and Y.Z.; writing--original draft preparation, K.Z., M.L. and Y.Z.; writing--review and editing, X.Y. and J.W.; supervision, X.Y. and J.W. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
**Data Availability Statement:** Publicly available datasets were analyzed in this study. This data can be found here: [10.1109/ITSC.2018.8569552].  
**Conflicts of Interest:** The authors declare no conflicts of interest.