# Using Machine Learning to Predict Pedestrian Compliance at Crosswalks in Jordan
## 4 Results and Discussion
Table 4 and Figure 2 showed that the highest ROC value reached 90.4% using the RF technique. This relatively high value indicates the model's ability to distinguish the behavior of compliant and non-compliant pedestrians at urban intersections and its ability to deal with many characteristics of pedestrian behavior that fluctuate with changes in the characteristics of the study site and the surrounding infrastructure. All of this gives reliable predictions in real-time traffic management system applications. As for the SVM model, its results showed less efficiency, as the ROC area result did not exceed 50.4%. This result weakens the model's ability to deal with changes in pedestrian behavior at urban intersections. Finally, the average ROC area values for the ANN and ID3 models, which were 87.8% and 85.1%, respectively, indicated that these models have the ability, to some extent, to predict pedestrian behavior and their compliance with the regulations at urban intersections. However, there is a need to improve the variables in the models to achieve better predictions and accuracy in the future. The previous variations in performance show that it is important to know about pedestrian conditions, the site's features, and the necessary prediction tasks. This is in addition to picking the right variables and factors when using ML models to study pedestrian behavior and how well they follow the rules when crossing urban intersections. As an example, the high performance of RF can be seen in its clustering method, which in turn reduces overfitting and error between individual decision trees. Furthermore, these findings are consistent with broader trends observed in pedestrian behavior research, where \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multicolumn{4}{c}{**Measurements**} \\ \cline{2-5}  & **Accuracy (\%)** & **Precision (\%)** & **FP Rate (\%)** & **ROC Area (\%)** \\ \hline ANN & 79.7 & 80.0 & 23.0 & 87.8 \\ \hline SVM & 65.3 & 66.7 & 64.5 & 50.4 \\ \hline ID3 & 79.4 & 79.2 & 30.9 & 85.1 \\ \hline RF & 81.2 & 80.9 & 25.2 & 90.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The performance of ANN, ID3, RF, and SVM. Figure 2: The performance achieved by all classification models. ensemble methods such as RF often outperform other models due to their ability to capture complex nonlinear relationships within large data sets. In addition to the classification model, the ID3 provides a set of rules that can be very useful to transportation agencies and relevant stakeholders. Transportation agencies and relevant stakeholders include a variety of organizations and individuals who have an interest in or responsibility for ensuring the safety, efficiency, and effectiveness of transportation systems, such as the Ministry of Transport, municipal and local government agencies, law enforcement agencies, public transportation authorities, road safety organizations, non-governmental organizations (NGOs), transportation research and academic institutions, and engineering and consulting firms. These rules can help agencies by guiding the development of policies that improve pedestrian safety. Urban planners can use the rules to create intersections that encourage compliance and decrease accidents. Additionally, advocacy groups can utilize the insights from the rules to focus on educational campaigns about pedestrian safety. Moreover, law enforcement agencies can use the rules to focus their efforts on intersections and behaviors with the highest risk of non-compliance, thereby optimizing resource allocation. Table 5 provides some of these rules. As shown in Table 5, there is a detailed explanation of the rule-based outputs of the decision tree algorithm (ID3) used in this study. These rules are essential to understanding the multifaceted nature of pedestrian compliance at signalized intersections in various urban areas in Jordan, specifically for the study areas of Amman, Irbid, and Zarqa.