## 4 Application
### eXtreme Gradient Boosting
The Area Under the Curve (AUC) depicted in Figure 5 illustrates the consistently strong performance of the model, with AUC values exceeding 80% across all ROC curves. Notably, the model exhibits particularly strong performance in extreme cases, with a true positive rate exceeding 85%. However, there is a slight decline in performance observed in intermediate classes. On average, this model achieves an accuracy rate of 74.48% for the 2019 dataset; therefore, we can affirm that this model represents with accuracy the importance of the parameters with a relevant correlation between the true labels and the predicted ones. Computing time can also be counted in model performance once it is trained, like in Table 5. For reference, average times for predictive values for a particular day, week, or month's worth of data are presented considering that this model's training and execution was carried out on an 11 th Gen Intel(R) i5-1135G7 that runs at 2.40 GHz with 16 GB of RAM and Windows 10 Pro 22H2--64 bits as the main operative system. It is concluded that this technology is perfectly adaptable for a dynamic interpretation of the data if this is to be implemented as a prediction tool by Barcelona council. For this model, Figure 5(a) shows the parameters ranked by frequency of appearance, where FromNorth, DailyHour, and DayMonth represent the majority of the relevance in order to classify the data rows. FromWest also shows a relatively superior relevance. These results are consistent with our initial hypotheses since the geographical location, the time, and the day of the month influence, and, therefore, help to explain, the behavior of current traffic status. Variables like DailyMinute and Weekday appear to be labeled as less determinant in the model. Moreover, checking not only the frequency of appearance but its cover (the relative number of observations linked in prediction with the variable) in Figure 5(b) and its gain (the relative contribution of each variable on each tree for every prediction) in Figure 5(c), it can be seen how variables such as ToWest and ToNorth, even though their percentage of appearance is not outstanding compared to others in terms of variable importance, have gain and cover which show how this is also defining the behavior of the model and therefore have a relevant impact on the outcome. Figure 5: Area Under the Curve for the XGBoost model. Figure 6: Variable analysis of the XGBoost model. \begin{table}
\begin{tabular}{c c} \hline \hline
**Time Lapse** & **Average Times after 50 Runs (s)** \\ \hline One day & 0.037577 \\ One week & 0.229319 \\ One month & 1.363848 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Computing times. As Figure 7 implies, classes 0, 1, and 2 obtain their explainability from DayMonth in the majority of cases. The rest of the classes find their explanation impact from coordinates like ToWest and FromWest. Lastly, Figure 8 illustrates the model's effect on various combinations of variables for each class. For class 0, the hour and day of the week have the greatest impact on the model. For class 1, the hour and North coordinates are the most important. For class 2, the hour and West coordinates have the greatest impact. For class 3, the hour and day of the week coordinates are the most important. In class 4, all four coordinates have the most impact on the model. Figure 8: _Cont._  
Figure 7: SHAP variable importance plot by classes.