The application of XGBoost and SHAP to examining the factors in freight truck-related crashes: An exploratory analysis - Yang, Chao; Chen, Mingyang; Yuan, Quan (Accident analysis and prevention, 2021)
•Spatial distribution of freight truck related crashes differs by injury severity.•In contrast with ZIP model, XGBoost model is used to test nonlinear relationships.•Demographics, land uses and road network matter in occurrence of those crashes.•SHAP method is employed to display details of nonlinearity in XGBoost model.•Impacts of built environment vary across contexts due to nonlinear relationships. Due to the burgeoning demand for freight movement, freight related road safety threats have been growing substantially. In spite of some research on the factors influencing freight truck-related crashes in major cities, the literature offers limited evidence about the effects of the built environment on the occurrence of those crashes by injury severity. This article uses data from the Los Angeles region in 2010–2019 to explore the relationships between the built environment factors and the spatial distribution of freight truck-related crashes using XGBoost and SHAP methods. Results from the XGBoost model show that variables related to the built environment, in particular demographics, land uses and road network, are highly correlated to freight truck related crashes of all three injury types. The SHAP value plots further indicate the important nonlinear relationships between independent variables and dependent variables. This study also emphasizes the differences in modeling mechanisms between the XGBoost model and traditional statistical models. The findings will help transport planners develop operational measures for resolving the emerging freight truck related traffic safety problems in local communities.