# Using Machine Learning to Predict Pedestrian Compliance at Crosswalks in Jordan
## 5 Conclusions  
In this study, pedestrian behavior at crosswalks was investigated using four models based on different ML algorithms that were developed: an artificial neural network (ANN), a support vector machine (SVM), a decision tree (ID3), and a random forest (RF). The data extracted from field videos of approximately 2437 pedestrians at the studied urban intersections provided a solid base to develop easily validated analytical and predictive models to raise the level of pedestrian safety in urban areas and compliance with traffic signals. Also, adults had a clear role in this study, as it was found that they were the most frequent users of intersections in urban areas with high economic activity, such as universities and shopping centers of various types. In addition, it was found that many pedestrians adhered to traffic laws when crossing the road rather than running, emphasizing that they did not ignore traffic signals. However, a noticeable percentage of pedestrians, especially children and the elderly, showed varying compliance, which can be attributed to a defect in the physical planning of intersections in addition to the nature of the urban environment.  
Based on the results of this study, the performance of ML models was very promising, with random forests outperforming other models in terms of accuracy, precision, and false-positive rate management. This makes this method reliable for predicting pedestrian compliance at urban crosswalks. These models not only help to understand pedestrian behaviors, but they also have massive potential as a critical tool for urban planners, traffic management authorities, and road and traffic engineers to design safer and more efficient pedestrian infrastructure, raising optimism for the future of pedestrian safety. Moreover, the spatial analysis in this study shows significant differences in pedestrian behavior at different intersections, which confirms the critical role of local variables such as proximity to educational institutions and commercial centers. These factors significantly impact pedestrian flow patterns, compliance with road regulations, and the local environment. This vision emphasizes the importance of having knowledge and experience of the local environment in developing targeted interventions that suit specific urban environments and demographic profiles.  
Future research should consider the possibility of integrating predictive models into real-time traffic management systems to improve preventive measures in pedestrian safety that dynamically interact with field variables. Also, data collection processes must be expanded to include more environmental and temporal variables, which can increase the efficiency and accuracy of predictions and the possibility of applying ML models. Finally, ML tools have demonstrated their high efficiency in analyzing and predicting pedestrian behavior at crossings, contributing to ongoing efforts to enhance pedestrian safety, and providing methodologies that apply to the development of other urban spaces facing similar challenges.  
Conceptualization, M.M.T., S.M.T. and A.H.A.; methodology, M.M.T. and S.M.T.; software, S.M.T.; validation, M.M.T. and S.M.T.; formal analysis, M.M.T., S.M.T. and A.H.A.; investigation, M.M.T., S.M.T. and A.H.A.; resources, M.M.T. and A.H.A.; data curation, M.M.T., S.M.T. and A.H.A.; writing--original draft preparation, M.M.T., S.M.T. and A.H.A.; writing--review and editing, M.M.T., S.M.T. and A.H.A.; visualization, M.M.T. and S.M.T.; supervision, M.M.T.; project administration, M.M.T.; funding acquisition, M.M.T., S.M.T. and A.H.A. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
Not applicable.  
The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.