Developing a Prediction Model for Real-Time Incident Detection Leveraging User-Oriented Participatory Sensing Data
Abstract
:1. Introduction
2. Literature Review
3. Methodology
3.1. Data
3.1.1. Waze
- Reliability: This score ranges from 0 to 10, reflecting the reliability of each alert based on user reactions (“thumbs up”, “not there”) and the reporting user’s level. Users gain levels (1 to 6) through contributions, with higher levels indicating more experienced and trustworthy users. Reliability scores start at 5 and will only drop below this threshold if a highly ranked editor submits a “not there” report, making it quite rare for the score to fall below 5.
- Confidence: This score ranges from 0 to 5, indicating the level of positive feedback from Waze users. Higher scores suggest higher confidence in the reported alert.
- Report Description: A description of the report provided when available.
- Road Type: This is an integer value ranging from 1 to 21, classifying different types of roads. In this study, roads are categorized as follows (the bracketed numbers represent these integer values, which are used to categorize and differentiate the types of roads in the Waze data):
- -
- Streets: Street (1), Primary Street (2), Secondary Street (6)
- -
- Highways and Ramps: Freeway (3), Ramp (4), Exit (11)
- -
- Trails and Walkways: Trail (5), 4 × 4 Trail (8 and 14), Walkway (9), Pedestrian (10), Stairway (16)
- -
- Transportation Facilities: Ferry Crossing (15), Private Road (17), Railroads (18), Runway/Taxiway (19), Parking Lot Road (20), Service Road (21)
- Report Rating: This is the user rank (1–6), based on the points they have accumulated through driving distances and map editing contributions [22]. The details of each rank (level) are as follows:
- -
- Level 1 (New Users): Users at this level can edit maps within a 1-mile radius. All users start at this level.
- -
- Level 2 (Beginner Editors): Users with over 3000 map edits or those who are IGN editors can edit maps within a 2-mile radius.
- -
- Level 3 (Proficient Editors): Users with over 25,000 map edits can edit maps within a 3-mile radius.
- -
- Level 4 (Advanced Editors): Users with over 100,000 map edits can edit maps within a 4-mile radius.
- -
- Level 5 (Expert Editors): Users with over 250,000 map edits can edit maps within a 4-mile radius.
- -
- Level 6 (Waze Champs): This level requires recommendations and approval by US Champs. Waze Champs have nationwide edited access.
- Thumbs Up: Number of positive reactions from users.
- AM Peak: 7 am to 9 am
- Morning Non-Peak: 9 am to 12 pm
- Afternoon Non-Peak: 12 pm to 4 pm
- PM Peak: 4 pm to 7 pm
- Evening Non-Peak: 7 pm to 9 pm
- Nighttime Non-Peak: 9 pm to 7 am
3.1.2. Crash Data
3.2. Methodological Framework
3.3. Evaluation of Waze Crash Alerts
Matching Rate Analysis
3.4. Alert–Crash Matches Analysis
3.5. Crash Alert Prediction Model
- Random Forest: Number of estimators, splitting metric (criterion), maximum depth, minimum samples required for split and leaf, and class weight [37].
- Decision Tree: Splitting metric (criterion), maximum depth, and minimum samples required for split and leaf [38].
- AdaBoost: Number of estimators and learning rate [39].
- Gradient Boosting: Number of estimators, learning rate, maximum depth, maximum features, loss function, subsampling fraction, splitting metric, tolerance, minimum samples required for split and leaf, validation fraction, and early stopping threshold [40].
- Logistic Regression: Regularization strength (C), penalty type, solver, tolerance, maximum iterations, and class weight [41].
- Accuracy: Accuracy refers to how many of the predictions made by a model are correct. It is the ratio of the number of correct predictions to all the predictions. It is calculated as follows:
- Precision: Precision indicates the proportion of instances predicted as positive by the model that are actually positive. It is given by the following:
- Recall: Recall measures the proportion of actual positive instances that the model correctly identified. It is calculated as follows:
- F1-Score: The F1-score is the harmonic mean of precision and recall, offering a single metric that weighs both precision and recall in a balanced way. The formula is as follows:
- Precision–Recall (PR) Curve: The PR curve is constructed by plotting precision against recall for various threshold values. The Area Under the PR curve (AUC-PR) is a common metric that summarizes the performance of the model across all possible thresholds. A higher AUC-PR score indicates a better performing model, with values closer to 1.0 indicating higher precision and recall.
- Receiver Operating Characteristic (ROC) Curve: This is another graphical representation utilized to assess the performance of a binary classifier. It is constructed by plotting the True Positive Rate (TPR), also known as recall, on the y-axis, against the False Positive Rate (FPR), defined as follows, on the x-axis. The Area Under the ROC curve (AUC-ROC) summarizes the ability of a classifier to distinguish between the positive and negative classes. An AUC-ROC value of 1 indicates perfect performance, while a value of 0.5 suggests that the model is no better than random guessing. The formulas for calculating TPR and FPR are as follows:
Model Performance Analysis
- Classification Metrics: The classification metrics for precision, recall, and F1-score for both true and false alerts on the test data obtained from the three models are summarized below. The results highlight the performance of each model in identifying true alerts (Class 1) and false alerts (Class 0), with performance across all metrics shown in Figure 10.
- Confusion Matrix: The confusion matrix as shown Figure 11 depicts the distribution of predictions for the test set across the three models. The Random Forest model demonstrates a strong ability to distinguish between true and false alerts. The matrix shows a high number of True Positives (TPs) for Class 1 (true alerts) (15,968), indicating that the model accurately identifies real incidents. Similarly, the True Negatives (TN) for Class 0 (false alerts) (15,459) are also high, demonstrating effective detection of false alerts. However, it still has some False Positives (FP) (3643) and False Negatives (FN) (3013), suggesting that there is some misclassification, particularly in predicting false alerts.
- Precision–Recall (PR) Curve: The Precision–Recall (PR) curves for the three models—Random Forest, Gradient Boosting, and Decision Tree—are shown in Figure 12. The Area Under the Curve (AUC) score for each model provides valuable insight into its overall performance in distinguishing between true and false alerts.
- Receiver Operating Characteristic (ROC) Curve: The Receiver Operating Characteristic (ROC) curves for Random Forest, Gradient Boosting, and Decision Tree, as shown in Figure 13, provide a clear picture of how well each model distinguishes between true and false alerts. The Area Under the Curve (AUC) for each model is used to evaluate the model’s ability to discriminate between the positive and negative classes, with higher AUC scores indicating better performance.
- Feature Importance: Figure 14 represents the importance of individual features in predicting true and false alerts for all three models. The feature importance results for Random Forest, Gradient Boosting, and Decision Tree (Figure 14) show consistent trends, with the Hour feature dominating in importance across all three models. This suggests that the time of day is a key determinant in predicting true and false alerts. Report Rating and Day of Week are also among the top features for all models, highlighting their influence in distinguishing between alerts. On the other hand, lower-ranked features like Crash Subtype, Year, and Confidence contributed minimally, suggesting that they may be less relevant for this classification task. These findings provide actionable insights for refining data collection efforts and highlight the potential for reducing dimensionality in future models by focusing on the most impactful features.
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
NJDOT | New Jersey Department of Transportation |
SSP | Safety Service Patrol |
NJSP | New Jersey State Police |
NJTR-1 | State of New Jersey Police Crash Investigation Report |
DBSCAN | Density-Based Spatial Clustering of Applications with Noise |
References
- Mukhopadhyay, A.; Pettet, G.; Vazirizade, S.M.; Lu, D.; Jaimes, A.; El Said, S.; Baroud, H.; Vorobeychik, Y.; Kochenderfer, M.; Dubey, A. A Review of Incident Prediction, Resource Allocation, and Dispatch Models for Emergency Management. Accid. Anal. Prev. 2022, 165, 106501. [Google Scholar] [CrossRef] [PubMed]
- Senarath, Y.; Nannapaneni, S.; Purohit, H.; Dubey, A. Emergency Incident Detection from Crowdsourced Waze Data Using Bayesian Information Fusion. In Proceedings of the 2020 IEEE/WIC/ACM International Joint Conference on Web Intelligence and Intelligent Agent Technology (WI-IAT), Melbourne, Australia, 14–17 December 2020; pp. 187–194. [Google Scholar]
- Sandt, A.; McCombs, J.; Al-Deek, H.; Carrick, G. Improving Law Enforcement and Emergency Response to Disabled Vehicle Crashes Using Waze Crowdsourced Data. Transp. Res. Rec. J. Transp. Res. Board 2024, 2678, 666–676. [Google Scholar] [CrossRef]
- About Waze—Waze Help. Available online: https://support.google.com/waze/answer/6071177?hl=en#zippy=%2Chow-does-waze-work (accessed on 22 July 2024).
- Rushe, D. Google Buys Waze Map App for $1.3bn. The Guardian. 11 June 2013. Available online: https://www.theguardian.com/technology/2013/jun/11/google-buys-waze-maps-billion (accessed on 19 May 2025).
- Pack, M.; Ivanov, N. Are You Gonna Go My Waze? Practical Advice for Working with 3rd Party Data Providers. ITE J. 2017, 87, 28–35. [Google Scholar]
- Driving Directions & Traffic Reports by Waze. Available online: https://www.waze.com/wazeforcities/ (accessed on 22 July 2024).
- Li, Z.; Kluger, R.; Hu, X.; Wu, Y.-J.; Zhu, X. Reconstructing Vehicle Trajectories to Support Travel Time Estimation. Transp. Res. Rec. 2018, 2672, 148–158. [Google Scholar] [CrossRef]
- Perez, G.V.A.; Lopez, J.C.; Cabello, A.L.R.; Grajales, E.B.; Espinosa, A.P.; Fabian, J.L.Q. Road Traffic Accidents Analysis in Mexico City through Crowdsourcing Data and Data Mining Techniques. Int. J. Comput. Inf. Eng. 2018, 12, 604–608. [Google Scholar]
- Lin, Y.; Li, R. Real-Time Traffic Accidents Post-Impact Prediction: Based on Crowdsourcing Data. Accid. Anal. Prev. 2020, 145, 105696. [Google Scholar] [CrossRef]
- Praharaj, S.; Zahura, F.T.; Chen, T.D.; Shen, Y.; Zeng, L.; Goodall, J.L. Assessing Trustworthiness of Crowdsourced Flood Incident Reports Using Waze Data: A Norfolk, Virginia Case Study. Transp. Res. Rec. 2021, 2675, 650–662. [Google Scholar] [CrossRef]
- Zhang, Z. Exploring the Potentials of Using Crowdsourced Waze Data in Traffic Management: Characteristics and Reliability. Ph.D. Thesis, Graduate School, Knoxville, TN, USA, 2020. [Google Scholar]
- Eriksson, I. Towards Integrating Crowdsourced and Official Traffic Data: A Study on the Integration of Data from Waze in Traffic Management in Stockholm, Sweden. Master’s Thesis, Uppsala University, Uppsala, Sweden, 2019. [Google Scholar]
- dos Santos, S.R.; Davis Jr, C.A.; Smarzaro, R. Analyzing Traffic Accidents Based on the Integration of Official and Crowdsourced Data. J. Inf. Data Manag. 2017, 8, 67–82. [Google Scholar]
- Amin-Naseri, M.; Chakraborty, P.; Sharma, A.; Gilbert, S.B.; Hong, M. Evaluating the Reliability, Coverage, and Added Value of Crowdsourced Traffic Incident Reports from Waze. Transp. Res. Rec. 2018, 2672, 34–43. [Google Scholar] [CrossRef]
- Safety Service Patrol, Highway Safety, About NJDOT. Available online: https://www.nj.gov/transportation/about/safety/ssp.shtm (accessed on 22 July 2024).
- Ester, M.; Kriegel, H.-P.; Sander, J.; Xu, X. A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise. In Proceedings of the Second International Conference on Knowledge Discovery and Data Mining, Portland, OR, USA, 31 December 1996; Volume 96, pp. 226–231. [Google Scholar]
- Hoseinzadeh, N.; Liu, Y.; Han, L.D.; Brakewood, C.; Mohammadnazar, A. Quality of Location-Based Crowdsourced Speed Data on Surface Streets: A Case Study of Waze and Bluetooth Speed Data in Sevierville, TN. Comput. Environ. Urban Syst. 2020, 83, 101518. [Google Scholar] [CrossRef]
- Goodall, N.; Lee, E. Comparison of Waze Crash and Disabled Vehicle Records with Video Ground Truth. Transp. Res. Interdiscip. Perspect. 2019, 1, 100019. [Google Scholar] [CrossRef]
- Krdy, M.A.; Al-Ott, A.; Sandt, A.; Al-Deek, H.; Carrick, G.; Ibrahim, S. Improving Law Enforcement Response by Utilizing Crowdsourced Data to Complement Computer-Aided Dispatch Data. In Proceedings of the 104th Transportation Research Board (TRB) Annual Meeting, Washington, DC, USA, 5–9 January 2025. [Google Scholar]
- Waze Data Feed Specifications—Waze Partners Help. Available online: https://support.google.com/waze/partners/answer/13458165?hl=en#zippy=%2Ctraffic-alerts%2Cusing-waze-traffic-data%2Cretrieving-waze-traffic-data%2Cjson-format%2Cxml%2Creliability-and-confidence-scores%2Cdata-elements%2Cjson (accessed on 26 July 2024).
- Your Rank and Points—Wazeopedia. Available online: https://www.waze.com/wiki/Canada/Your_Rank_and_Points (accessed on 26 July 2024).
- Accident Type Descriptions—Waze Forum. Available online: https://www.waze.com/forum/viewtopic.php?t=79663 (accessed on 26 July 2024).
- New Jersey Njtr-1 Crash Report Manual; Motor Vehicle Comission: Trenton, NJ, USA, 2023.
- Chawla, N.V.; Bowyer, K.W.; Hall, L.O.; Kegelmeyer, W.P. SMOTE: Synthetic Minority over-Sampling Technique. J. Artif. Intell. Res. 2002, 16, 321–357. [Google Scholar] [CrossRef]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
- Myles, A.J.; Feudale, R.N.; Liu, Y.; Woody, N.A.; Brown, S.D. An Introduction to Decision Tree Modeling. J. Chemom. 2004, 18, 275–285. [Google Scholar] [CrossRef]
- Schapire, R.E. Explaining AdaBoost. In Empirical Inference; Schölkopf, B., Luo, Z., Vovk, V., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; pp. 37–52. ISBN 978-3-642-41135-9. [Google Scholar]
- Natekin, A.; Knoll, A. Gradient Boosting Machines, a Tutorial. Front. Neurorobot. 2013, 7, 21. [Google Scholar] [CrossRef] [PubMed]
- DeMaris, A. A Tutorial in Logistic Regression. J. Marriage Fam. 1995, 57, 956–968. [Google Scholar] [CrossRef]
- StratifiedKFold. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.StratifiedKFold.html (accessed on 15 January 2025).
- Alshehri, A.; Eustace, D.; Hovey, P. Analysis of Factors Affecting Crash Severity of Pedestrian and Bicycle Crashes Involving Vehicles at Intersections. In Proceedings of the International Conference on Transportation and Development 2020, Seattle, WA, USA, 26–29 May 2020; American Society of Civil Engineers: Reston, VA, USA, 2020; pp. 49–58. [Google Scholar]
- Agresti, A. An Introduction to Categorical Data Analysis; Wiley: Hoboken, NJ, USA, 1996. [Google Scholar]
- StandardScaler. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html (accessed on 15 January 2025).
- Train_test_split. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html (accessed on 15 January 2025).
- RandomizedSearchCV. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.RandomizedSearchCV.html (accessed on 15 January 2025).
- RandomForestClassifier. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html (accessed on 16 January 2025).
- DecisionTreeClassifier. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html (accessed on 16 January 2025).
- AdaBoostClassifier. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.AdaBoostClassifier.html (accessed on 16 January 2025).
- GradientBoostingClassifier. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingClassifier.html (accessed on 16 January 2025).
- LogisticRegression. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html (accessed on 16 January 2025).
- Fan, J.; Upadhye, S.; Worster, A. Understanding Receiver Operating Characteristic (ROC) Curves. Can. J. Emerg. Med. 2006, 8, 19–20. [Google Scholar] [CrossRef] [PubMed]
Year | Month | Matched with Actual Crash | Unmatched with Actual Crash | Matching Rate (%) |
---|---|---|---|---|
2021 | September | 469 | 2333 | 16.7 |
October | 3436 | 14,644 | 19.0 | |
November | 2936 | 12,976 | 18.5 | |
December | 2814 | 11,702 | 19.4 | |
2022 | January | 1677 | 10,399 | 13.9 |
February | 1512 | 10,718 | 12.4 | |
March | 1703 | 12,491 | 12.0 | |
April | 234 | 1432 | 14.1 | |
2023 | June | 1826 | 10,933 | 14.3 |
July | 2060 | 13,186 | 13.5 | |
Overall Matching Rate | 15.6 |
Variables | Predictors | Coefficient | Std. Error | Z-Value | p-Value | Odds Ratio |
---|---|---|---|---|---|---|
Intercept | −8.054 | 43.954 | −0.183 | 0.855 | 0.000 | |
Day of the week | Weekend | 0.000 | - | - | - | - |
Weekday | 0.105 | 0.020 | 5.15 | 0.000 | 1.111 | |
Time category | Nighttime non-peak | 0.000 | - | - | - | - |
AM peak | 0.395 | 0.033 | 12.128 | 0.000 | 1.484 | |
Morning non-peak | 0.211 | 0.034 | 6.265 | 0.000 | 1.235 | |
Afternoon non-peak | 0.263 | 0.028 | 9.494 | 0.000 | 1.300 | |
PM peak | 0.316 | 0.028 | 11.091 | 0.000 | 1.371 | |
Road type category | Secondary street | 0.000 | - | - | - | - |
Ramp | −0.577 | 0.038 | −15.026 | 0.000 | 0.562 | |
Street | −0.733 | 0.047 | −15.505 | 0.000 | 0.480 | |
Primary street | 0.377 | 0.026 | 14.746 | 0.000 | 1.458 | |
Freeway | −0.775 | 0.028 | −27.944 | 0.000 | 0.461 | |
Reliability | Reliability4 | 0.000 | - | - | - | - |
Reliability5 | 5.918 | 43.954 | 0.135 | 0.893 | 371.755 | |
Reliability6 | 6.084 | 43.954 | 0.138 | 0.890 | 438.914 | |
Reliability7 | 6.040 | 43.954 | 0.137 | 0.891 | 419.930 | |
Reliability8 | 6.028 | 43.954 | 0.137 | 0.891 | 414.761 | |
Reliability9 | 6.013 | 43.954 | 0.137 | 0.891 | 408.698 | |
Reliability10 | 6.017 | 43.954 | 0.137 | 0.891 | 410.502 | |
Report rating | Report Rating1 | 0.000 | - | - | - | - |
Report Rating2 | 0.105 | 0.041 | 2.563 | 0.010 | 1.110 | |
Report Rating3 | 0.276 | 0.032 | 8.631 | 0.000 | 1.317 | |
Report Rating4 | 0.328 | 0.029 | 11.21 | 0.000 | 1.388 | |
Report Rating5 | 0.347 | 0.032 | 11.011 | 0.000 | 1.415 | |
Report Rating6 | 0.295 | 0.034 | 8.745 | 0.000 | 1.343 | |
Confidence | Confidence0 | 0.000 | - | - | - | - |
Confidence1 | 0.102 | 0.069 | 1.475 | 0.140 | 1.107 | |
Confidence2 | 0.212 | 0.173 | 1.229 | 0.219 | 1.237 | |
Confidence3 | 0.477 | 0.246 | 1.941 | 0.052 | 1.612 | |
Confidence4 | 0.224 | 0.351 | 0.64 | 0.522 | 1.252 | |
Confidence5 | 0.474 | 0.489 | 0.968 | 0.333 | 1.606 | |
Crash Type | No subtype | 0.000 | - | - | - | - |
Minor | −0.073 | 0.020 | −3.727 | 0.000 | 0.929 | |
Major | 0.257 | 0.021 | 12.357 | 0.000 | 1.293 |
Predicted Values | |||
---|---|---|---|
Negative | Positive | ||
Actual Values | Negative | True Negative (TN) | False Positive (FP) |
Positive | False Negative (FN) | True Positive (TP) |
Randomized Grid Search Result | Performance on Test Data | |||||
---|---|---|---|---|---|---|
Model | Best Score | Best Parameters | Accuracy | Recall | Precision | F1-Score |
Random Forest | 82.5% | n estimators = 80; min samples split = 5; min sample leaf = 1; max depth = 100; criterion = entropy; class weight = balanced; bootstrap = false | 82.5% | 84.1% | 81.4% | 82.8% |
Decision Tree | 80.1% | splitter = best; min samples split = 2; min samples leaf = 2; max depth = 30; criterion = log loss | 80.2% | 81.8% | 79.1% | 80.4% |
Ada Boost | 72.0% | n estimators = 30; learning rate = 1.0; estimator = Decision Tree Classifier (max depth = 5) | 72.0% | 69.7% | 72.9% | 71.2% |
Gradient Boosting | 81.8% | warm start = false; validation fraction = 0.2; tolerance = 0.001; subsample = 1.0; n iteration no change = 10; n estimators = 200; min samples split = 10; min samples leaf = 1; max features = 0.8; max depth = 20; loss: log loss; learning rate: 0.1; criterion: squared error; ccp alpha: 0.0 | 81.8% | 84.5% | 80.2% | 82.2% |
Logistic Regression | 58.9% | tolerance: 0.001; solver: lbfgs; penalty: L2; max iteration: 200; class weight: balanced; C: 2.0 | 59.3% | 58.5% | 59.3% | 58.9% |
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. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Hossain, M.T.; Lee, J.; Besenski, D.; Dimitrijevic, B.; Spasovic, L. Developing a Prediction Model for Real-Time Incident Detection Leveraging User-Oriented Participatory Sensing Data. Information 2025, 16, 423. https://doi.org/10.3390/info16060423
Hossain MT, Lee J, Besenski D, Dimitrijevic B, Spasovic L. Developing a Prediction Model for Real-Time Incident Detection Leveraging User-Oriented Participatory Sensing Data. Information. 2025; 16(6):423. https://doi.org/10.3390/info16060423
Chicago/Turabian StyleHossain, Md Tufajjal, Joyoung Lee, Dejan Besenski, Branislav Dimitrijevic, and Lazar Spasovic. 2025. "Developing a Prediction Model for Real-Time Incident Detection Leveraging User-Oriented Participatory Sensing Data" Information 16, no. 6: 423. https://doi.org/10.3390/info16060423
APA StyleHossain, M. T., Lee, J., Besenski, D., Dimitrijevic, B., & Spasovic, L. (2025). Developing a Prediction Model for Real-Time Incident Detection Leveraging User-Oriented Participatory Sensing Data. Information, 16(6), 423. https://doi.org/10.3390/info16060423