Sustainable Safety Planning on Two-Lane Highways: A Random Forest Approach for Crash Prediction and Resource Allocation
Abstract
1. Introduction
2. Literature Review
3. Data Collection & Processing
4. Methodology
5. Analysis & Results
5.1. Variable Selection
5.2. Random Forest Calibration
5.3. Performance Evaluation
5.4. Variable Importance & Interpretation of the Effect of Explanatory Variables
6. Application of the RF-SHAP-Informed Framework
- Identification of Countermeasures based on SHAP Contributions:
- Expected Crash Reduction (ECR) After Applying Treatments and Segment Ranking:
- Program-Level Resource Allocation
7. Conclusions
8. Limitations and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| AADT | Annual Average Daily Traffic |
| SPF | Safety Performance Function |
| CMF | crash modification factors |
| AASHTO | American Association of State Highway and Transportation Officials |
| HSM | Highway Safety Manual |
| SHAP | SHapley Additive exPlanations |
| ZINB | Zero-inflated Negative Binomial |
| HIS | Highway Information System |
| CV | Cross-Validation |
| PCC | Pearson Correlation Coefficient |
| MSE | Mean Squared Error |
| MAD | Mean Absolute Deviation |
References
- Lovegrove, G.R.; Sayed, T. Using Macrolevel Collision Prediction Models in Road Safety Planning Applications. Transp. Res. Rec. 2006, 1950, 73–82. [Google Scholar]
- Lovegrove, G.R.; Sayed, T. Macrolevel Collision Prediction Models to Enhance Traditional Reactive Road Safety Improvement Programs. Transp. Res. Rec. 2007, 2019, 65–73. [Google Scholar]
- HSM. Highway Safety Manual Part C, 1st ed.; AASHTO: Washington, DC, USA, 2010; Volume 2. [Google Scholar]
- ODOT. Analysis Procedures Manual. 1205; Oregon Department of Transportation: Salem, ON, USA, 2025. [Google Scholar]
- Rajabi, M.; Ogle, J.H.; Gerard, P. Highway Safety Manual Calibration: Assessing Alternate Definitions of the Calibration Factor. Transp. Res. Rec. 2018, 2672, 99–108. [Google Scholar]
- Ijaz, M.; Lan, L.; Zahid, M.; Jamal, A. A Comparative Study of Machine Learning Classifiers for Injury Severity Prediction of Crashes Involving Three-Wheeled Motorized Rickshaw. Accid. Anal. Prev. 2021, 154, 106094. [Google Scholar] [CrossRef]
- Iranitalab, A.; Khattak, A. Comparison of Four Statistical and Machine Learning Methods for Crash Severity Prediction. Accid. Anal. Prev. 2017, 108, 27–36. [Google Scholar] [CrossRef]
- Lord, D.; Mannering, F. The Statistical Analysis of Crash-Frequency Data: A Review and Assessment of Methodological Alternatives. Transp. Res. Part A Policy Pract. 2010, 44, 291–305. [Google Scholar]
- Pan, G.; Fu, L.; Thakali, L. Development of a Global Road Safety Performance Function Using Deep Neural Networks. Int. J. Transp. Sci. Technol. 2017, 6, 159–173. [Google Scholar] [CrossRef]
- Pu, Z.; Li, Z.; Ke, R.; Hua, X.; Wang, Y. Evaluating the Nonlinear Correlation between Vertical Curve Features and Crash Frequency on Highways Using Random Forests. J. Transp. Eng. Part A Syst. 2020, 146, 04020115. [Google Scholar]
- Wen, X.; Xie, Y.; Jiang, L.; Li, Y.; Ge, T. On the Interpretability of Machine Learning Methods in Crash Frequency Modeling and Crash Modification Factor Development. Accid. Anal. Prev. 2022, 168, 106617. [Google Scholar] [CrossRef]
- Zeng, Q.; Huang, H.; Pei, X.; Wong, S.; Gao, M. Rule Extraction from an Optimized Neural Network for Traffic Crash Frequency Modeling. Accid. Anal. Prev. 2016, 97, 87–95. [Google Scholar] [CrossRef]
- Das, S.; Sun, X.; Sun, M. Rule-Based Safety Prediction Models for Rural Two-Lane Run-Off-Road Crashes. Int. J. Transp. Sci. Technol. 2021, 10, 235–244. [Google Scholar] [CrossRef]
- Yu, R.; Abdel-Aty, M. Utilizing Support Vector Machine in Real-Time Crash Risk Evaluation. Accid. Anal. Prev. 2013, 51, 252–259. [Google Scholar] [CrossRef] [PubMed]
- Tayebikhorami, S.; Sacchi, E. Validation of Machine Learning Algorithms as Predictive Tool in the Road Safety Management Process: Case of Network Screening. J. Transp. Eng. Part A Syst. 2022, 148, 04022068. [Google Scholar]
- Saha, D.; Alluri, P.; Gan, A. Prioritizing Highway Safety Manual’s Crash Prediction Variables Using Boosted Regression Trees. Accid. Anal. Prev. 2015, 79, 133–144. [Google Scholar] [CrossRef]
- Wei, Z.; Das, S.; Zhang, Y. Short Duration Crash Prediction for Rural Two-Lane Roadways: Applying Explainable Artificial Intelligence. Transp. Res. Rec. 2022, 2676, 535–549. [Google Scholar]
- Anderson, I.B.; Bauer, K.M.; Harwood, D.W.; Fitzpatrick, K. Relationship to Safety of Geometric Design Consistency Measures for Rural Two-Lane Highways. Transp. Res. Rec. 1999, 1658, 43–51. [Google Scholar] [CrossRef]
- Bornheimer, C. Finding a New Safety Performance Function for Two-Way, Two-Lane Highways in Rural Areas. Doctoral Dissertation, University of Kansas, Lawrence, KS, USA, 2011. [Google Scholar]
- Cafiso, S.; Di Graziano, A.; Di Silvestro, G.; La Cava, G.; Persaud, B. Development of Comprehensive Accident Models for Two-Lane Rural Highways Using Exposure, Geometry, Consistency and Context Variables. Accid. Anal. Prev. 2010, 42, 1072–1079. [Google Scholar] [CrossRef]
- De Oña, J.; Garach, L. Accidents Prediction Model Based on Speed Reduction on Spanish Two-Lane Rural Highways. Procedia-Soc. Behav. Sci. 2012, 53, 1010–1018. [Google Scholar]
- Huang, H.; Chin, H.C. Modeling Road Traffic Crashes with Zero-Inflation and Site-Specific Random Effects. Stat. Methods Appl. 2010, 19, 445–462. [Google Scholar]
- Kweon, Y.J.; Kockelman, K.M. Safety Effects of Speed Limit Changes: Use of Panel Models, Including Speed, Use, and Design Variables. Transp. Res. Rec. 2005, 1908, 148–158. [Google Scholar] [CrossRef]
- Llopis-Castelló, D.; Bella, F.; Camacho-Torregrosa, F.J.; García, A. New Consistency Model Based on Inertial Operating Speed Profiles for Road Safety Evaluation. J. Transp. Eng. Part A Syst. 2018, 144, 10. [Google Scholar]
- Dutta, N.; Fontaine, M.D. Developing Rural Four Lane Freeway Crash Prediction Models Using Hourly Flow Parameters. In Proceedings of the TRB 2019 Annual Meeting, Washington, DC, USA, 13–17 January 2019. [Google Scholar]
- Sharma, A.K.; Landge, V.S. Zero Inflated Negative Binomial for Modeling Heavy Vehicle Crash Rate on Indian Rural Highway. Int. J. Adv. Eng. Technol. 2013, 5, 292. [Google Scholar]
- Wang, C.; Quddus, M.; Ison, S. The Effects of Area-Wide Road Speed and Curvature on Traffic Casualties in England. J. Transp. Geogr. 2009, 17, 385–395. [Google Scholar] [CrossRef]
- Xu, J.; Kockelman, K.M.; Wang, Y. Modeling Crash and Fatality Counts Along Mainlanes and Frontage Roads across Texas: The Roles of Design, the Built Environment, and Weather. In Proceedings of the 93rd Annual Meeting of the Transportation Research, Washington, DC, USA, 12–16 January 2014. [Google Scholar]
- Yan, X.; Wang, B.; An, M.; Zhang, C. Distinguishing between Rural and Urban Road Segment Traffic Safety Based on Zero-Inflated Negative Binomial Regression Models. Discret. Dyn. Nat. Soc. 2012, 2012, 11. [Google Scholar] [CrossRef]
- Kockelman, K.K.; Ma, J. Freeway Speeds and Speed Variations Preceding Crashes, within and across Lanes. J. Transp. Res. Forum 2007, 46, 1. [Google Scholar]
- Lave, C.A. Speeding, Coordination, and the 55 Mph Limit. Am. Econ. Rev. 1985, 75, 1159–1164. [Google Scholar]
- Ma, J.; Kockelman, K.M.; Damien, P. A Multivariate Poisson-Lognormal Regression Model for Prediction of Crash Counts by Severity, Using Bayesian Methods. Accid. Anal. Prev. 2008, 40, 964–975. [Google Scholar] [CrossRef]
- Stapleton, S.Y.; Ingle, A.J.; Chakraborty, M.; Gates, T.J.; Savolainen, P.T. Safety Performance Functions for Rural Two-Lane County Road Segments. Transp. Res. Rec. 2018, 2672, 226–237. [Google Scholar]
- Wang, K.; Ivan, J.N.; Ravishanker, N.; Jackson, E. Multivariate Poisson Lognormal Modeling of Crashes by Type and Severity on Rural Two Lane Highways. Accid. Anal. Prev. 2017, 99, 6–19. [Google Scholar] [CrossRef]
- Wu, K.-F.; Donnell, E.T.; Himes, S.C.; Sasidharan, L. Exploring the Association between Traffic Safety and Geometric Design Consistency Based on Vehicle Speed Metrics. J. Transp. Eng. Part A Syst. 2013, 139, 738–748. [Google Scholar]
- Hezaveh, A.M.; Arvin, R.; Cherry, C.R. A Geographically Weighted Regression to Estimate the Comprehensive Cost of Traffic Crashes at a Zonal Level. Accid. Anal. Prev. 2019, 131, 15–24. [Google Scholar] [CrossRef]
- Li, Z.; Wang, W.; Liu, P.; Bigham, J.M.; Ragland, D.R. Using Geographically Weighted Poisson Regression for County-Level Crash Modeling in California. Saf. Sci. 2013, 58, 89–97. [Google Scholar] [CrossRef]
- Liu, J.; Khattak, A.J.; Wali, B. Do Safety Performance Functions Used for Predicting Crash Frequency Vary across Space? Applying Geographically Weighted Regressions to Account for Spatial Heterogeneity. Accid. Anal. Prev. 2017, 109, 132–142. [Google Scholar] [CrossRef] [PubMed]
- Mathew, S.; Pulugurtha, S.S.; Duvvuri, S. Exploring the Effect of Road Network, Demographic, and Land Use Characteristics on Teen Crash Frequency Using Geographically Weighted Negative Binomial Regression. Accid. Anal. Prev. 2022, 168, 106615. [Google Scholar] [CrossRef] [PubMed]
- Mohammadnazar, A.; Mahdinia, I.; Ahmad, N.; Khattak, A.J.; Liu, J. Understanding How Relationships between Crash Frequency and Correlates Vary for Multilane Rural Highways: Estimating Geographically and Temporally Weighted Regression Models. Accid. Anal. Prev. 2021, 157, 106146. [Google Scholar] [CrossRef] [PubMed]
- Wang, C.; Li, S.; Shan, J. Non-Stationary Modeling of Microlevel Road-Curve Crash Frequency with Geographically Weighted Regression. ISPRS Int. J. Geo-Inf. 2021, 10, 286. [Google Scholar] [CrossRef]
- Nelder, J.A.; Wedderburn, R.W. Generalized Linear Models. J. R. Stat. Soc. Ser. A Stat. Soc. 1972, 135, 370–384. [Google Scholar]
- Li, X.; Lord, D.; Zhang, Y.; Xie, Y. Predicting Motor Vehicle Crashes Using Support Vector Machine Models. Accid. Anal. Prev. 2008, 40, 1611–1618. [Google Scholar] [CrossRef]
- Zhang, Z.; Nie, Q.; Liu, J.; Hainen, A.; Islam, N.; Yang, C. Machine Learning Based Real-Time Prediction of Freeway Crash Risk Using Crowdsourced Probe Vehicle Data. J. Intell. Transp. Syst. 2024, 28, 84–102. [Google Scholar]
- Yu, R.; Abdel-Aty, M. Analyzing Crash Injury Severity for a Mountainous Freeway Incorporating Real-Time Traffic and Weather Data. Saf. Sci. 2014, 63, 50–56. [Google Scholar] [CrossRef]
- Sakib, N.; Paul, T.; Das, S.; Hossain, A. Exploring the Factors Affecting Injury Severity in Highway and Non-Highway Crashes in Bangladesh Applying Machine Learning and Shap. IATSS Res. 2025, 49, 259–270. [Google Scholar] [CrossRef]
- Owais, M.; Alshehri, A.; Gyani, J.; Aljarbou, M.H.; Alsulamy, S. Prioritizing Rear-End Crash Explanatory Factors for Injury Severity Level Using Deep Learning and Global Sensitivity Analysis. Expert Syst. Appl. 2024, 245, 123114. [Google Scholar] [CrossRef]
- Moussa, G.S.; Owais, M.; Dabbour, E. Variance-Based Global Sensitivity Analysis for Rear-End Crash Investigation Using Deep Learning. Accid. Anal. Prev. 2022, 165, 106514. [Google Scholar] [PubMed]
- Green, E.R. Segmentation Strategies for Road Safety Analysis. Doctoral Dissertation, Doctor of Philosophy, University of Kentucky, Lexington, KY, USA, 2018. [Google Scholar]
- Green, E.R.; Blackden, C.; Fields, M.A. Spatial Database for Intersections; University of Kentucky Transportation Center: Lexington, KY, USA, 2015. [Google Scholar]
- Hauer, E.; Bamfo, J. Two Tools for Finding What Function Links the Dependent Variable to the Explanatory Variables. In Proceedings of the ICTCT 1997 Conference, Lund, Sweden, 5–7 November 1997. [Google Scholar]
- Available online: https://www.here.com/ (accessed on 1 January 2018).
- Zhang, X.; Chen, M. Methodology for Conflating Large-Scale Roadway Networks. Transp. Res. Rec. J. Transp. Res. Board 2022, 2677, 189–202. [Google Scholar] [CrossRef]
- Li, S.; Zhu, K.; van Gelder, B.H.W.; Nagle, J.; Tuttle, C. Reconsideration of Sample Size Requirements for Field Traffic Data Collection with Global Positioning System Devices. Transp. Res. Rec. 2002, 1804, 17–22. [Google Scholar]
- Crunkleton, J.L.; Tarnoff, P.J. Statistical Patterns of Traffic Data and Sample Size Estimation; Center for Advanced Transportation Technology: College Park, MD, USA, 2015. [Google Scholar]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar]
- Gong, H.; Sun, Y.; Shu, X.; Huang, B. Use of Random Forests Regression for Predicting Iri of Asphalt Pavements. Constr. Build. Mater. 2018, 189, 890–897. [Google Scholar] [CrossRef]
- Svetnik, V.; Liaw, A.; Tong, C.; Culberson, J.C.; Sheridan, R.P.; Feuston, B.P. Random Forest: A Classification and Regression Tool for Compound Classification and Qsar Modeling. J. Chem. Inf. Comput. Sci. 2003, 43, 1947–1958. [Google Scholar] [CrossRef]
- Li, P.; Abdel-Aty, M.; Yuan, J. Real-Time Crash Risk Prediction on Arterials Based on Lstm-Cnn. Accid. Anal. Prev. 2020, 135, 105371. [Google Scholar] [CrossRef]
- Han, S.; Williamson, B.D.; Fong, Y. Improving Random Forest Predictions in Small Datasets from Two-Phase Sampling Designs. BMC Med. Inform. Decis. Mak. 2021, 21, 322. [Google Scholar]
- Parmar, H.; Bhanderi, S.; Shah, G. Sentiment Mining of Movie Reviews Using Random Forest with Tuned Hyperparameters. In Proceedings of the International Conference on Information Science, Kerala, India, 4–5 July 2014. [Google Scholar]
- Probst, P.; Wright, M.N.; Boulesteix, A. Hyperparameters and Tuning Strategies for Random Forest. Wiley Interdiscip. Rev. Data Min. Knowl. Discov. 2019, 9, e1301. [Google Scholar] [CrossRef]
- Rahman, F.; Zhang, X.; Chen, M. Evaluating Effect of Operating Speed on Crashes of Rural Two-Lane Highways. J. Adv. Transp. 2023, 2023, 2882951. [Google Scholar] [CrossRef]
- Saha, D.; Alluri, P.; Gan, A. A Random Forests Approach to Prioritize Highway Safety Manual (Hsm) Variables for Data Collection. J. Adv. Transp. 2016, 50, 522–540. [Google Scholar]
- Genuer, R.; Poggi, J.M.; Tuleau-Malot, C. Variable Selection Using Random Forests. Pattern Recognit. Lett. 2010, 31, 2225. [Google Scholar] [CrossRef]
- Lord, D.; Washington, S.; Ivan, J.N. Further Notes on the Application of Zero-Inflated Models in Highway Safety. Accid. Anal. Prev. 2007, 39, 53–57. [Google Scholar] [CrossRef] [PubMed]
- Lord, D.; Washington, S.P.; Ivan, J.N. Poisson, Poisson-Gamma and Zero-Inflated Regression Models of Motor Vehicle Crashes: Balancing Statistical Fit and Theory. Accid. Anal. Prev. 2005, 37, 35–46. [Google Scholar] [PubMed]
- Raihan, A.; Alluri, P.; Wu, W.; Gan, A. Estimation of Bicycle Crash Modification Factors (Cmfs) on Urban Facilities Using Zero Inflated Negative Binomial Models. Accid. Anal. Prev. 2019, 123, 303–313. [Google Scholar] [CrossRef] [PubMed]
- Lee, J.; Abdel-Aty, M.; Shah, I. Evaluation of Surrogate Measures for Pedestrian Trips at Intersections and Crash Modeling. Accid. Anal. Prev. 2019, 130, 91–98. [Google Scholar] [CrossRef]
- Rahman, F. Incorporating Speed into Crash Modeling for Rural Two-Lane Highways. 2022. Available online: https://uknowledge.uky.edu/ce_etds/121/ (accessed on 1 July 2023).
- Lundberg, S.M.; Lee, S.I. A Unified Approach to Interpreting Model Predictions. Adv. Neural Inf. Process. Syst. 2017, 30, 1–10. [Google Scholar]
- Lee, J.; Mannering, F. Impact of Roadside Features on the Frequency and Severity of Run-Off-Roadway Accidents: An Empirical Analysis. Accid. Anal. Prev. 2002, 34, 149–161. [Google Scholar]
- Ali, Y.; Hussain, F.; Haque, M. Advances, Challenges, and Future Research Needs in Machine Learning-Based Crash Prediction Models: A Systematic Review. Accid. Anal. Prev. 2024, 194, 107378. [Google Scholar] [CrossRef]
- Salih, A.M. Explainable Artificial Intelligence for Dependent Features: Additive Effects of Collinearity. In Proceedings of the 2024 8th International Conference on Advances in Artificial Intelligence, London, UK, 17–19 October 2024. [Google Scholar]
- Shrestha, N. Detecting Multicollinearity in Regression Analysis. Am. J. Appl. Math. Stat. 2020, 8, 39–42. [Google Scholar] [CrossRef]
- Pei, X.; Wong, S.; Sze, N. The Roles of Exposure and Speed in Road Safety Analysis. Accid. Anal. Prev. 2012, 48, 464–471. [Google Scholar] [CrossRef]











| Variables | Unit | Statistics | ||||
|---|---|---|---|---|---|---|
| Min. | The 25th Percentile | Median | The 75th Percentile | Max. | ||
| AADT | vehicles | 2 | 310 | 675 | 1617 | 19,619 |
| Segment Length (l) | km | 0.2 | 0.2 | 0.3 | 0.5 | 4.7 |
| Curvature (cu) | degrees | 0.0 | 0.2 | 0.8 | 3.6 | 63.8 |
| Lane Width (lw) | m | 1.8 | 2.7 | 2.7 | 3.0 | 5.5 |
| Shoulder Width (sw) | m | 0.0 | 0.6 | 0.9 | 1.2 | 4.3 |
| Average Speed (va) | kmph | 8.7 | 52.8 | 64.6 | 76.5 | 99.5 |
| Standard Deviation (std) of Speed | kmph | 10.0 | 21.1 | 25.7 | 31.1 | 59.1 |
| The 85th Percentile Speed (v85) | kmph | 20.8 | 69.5 | 79.1 | 88.7 | 108.3 |
| Crash Frequencies in 5 years | 0 | 0 | 0 | 1 | 161 | |
| Hyperparameters | Description | Trial of Values | Optimum Value after Tuning |
|---|---|---|---|
| n_estimators | Number of trees | 500, 1000, 5000, and 10,000 | 10,000 |
| max_features | Number of explanatory variables in each split | * | p |
| max_depth | Maximum depth | 5, 10, 20 | 10 |
| min_samples_leaf | Minimum number of samples in a terminal node | 1, 2, 4 | 4 |
| min_sample_split | Number of samples required to split a node. | 2, 5, 10 | 2 |
| Measures | RF Model | ZINB Model | ||
|---|---|---|---|---|
| Training Data | Testing Data | Training Data | Testing Data | |
| R2 | 0.57 | 0.40 | 0.27 | 0.32 |
| RMSE | 1.89 | 2.01 | 2.47 | 2.13 |
| MAD | 0.88 | 0.96 | 1.04 | 1.02 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Rahman, F.; Srinivasan, C.; Zhang, X.; Chen, M. Sustainable Safety Planning on Two-Lane Highways: A Random Forest Approach for Crash Prediction and Resource Allocation. Sustainability 2026, 18, 635. https://doi.org/10.3390/su18020635
Rahman F, Srinivasan C, Zhang X, Chen M. Sustainable Safety Planning on Two-Lane Highways: A Random Forest Approach for Crash Prediction and Resource Allocation. Sustainability. 2026; 18(2):635. https://doi.org/10.3390/su18020635
Chicago/Turabian StyleRahman, Fahmida, Cidambi Srinivasan, Xu Zhang, and Mei Chen. 2026. "Sustainable Safety Planning on Two-Lane Highways: A Random Forest Approach for Crash Prediction and Resource Allocation" Sustainability 18, no. 2: 635. https://doi.org/10.3390/su18020635
APA StyleRahman, F., Srinivasan, C., Zhang, X., & Chen, M. (2026). Sustainable Safety Planning on Two-Lane Highways: A Random Forest Approach for Crash Prediction and Resource Allocation. Sustainability, 18(2), 635. https://doi.org/10.3390/su18020635
