## 6 Results and Discussion
### Cluster Analysis of the Prediction Errors
The results show that a high share of the observations have small MAPE prediction errors (87.32%), which shows good accuracy of the machine learning models used to predict the UberX fare (the Random Forest is the machine learning model with the best performance metrics and is also one of the models contributing the most to the group with small MAPE prediction errors). Likewise, it shows a very small share of the observations with high MAPE prediction errors (only 1.96%), which can be caused by unexpected surges due to imbalances between supply and demand, as well as being related to outliers that were not removed and/or other variables (see Section 4). Table 6 presents a summary of the statistics of the clusters in terms of key continuous variables (e.g., UberX fare, trip distance, travel time, etc.). Forecasting ride-hailing fares appears more difficult (high MAPE prediction errors) when the supply value of the fare variable (FARE) and when rain precipitation (PREC) is higher, but the high standard deviations of the errors overshadow this effect (due to the existence of outliers in all groups). It is also noteworthy there is no clear trend for the variables trip distance (DIST), travel time (TTIME), and delay (DELAY) concerning the errors across clusters, which means the models have already captured the statistical signal from these variables. Table 7 shows the percentage of frequency of observations of the categorical variables within the three clusters. The results of the percentages of frequency of observations of the categorical variables per cluster show how much they interfere with the MAPE prediction errors, mainly in cluster #3 (High error). The prediction of ride-hailing fares becomes slightly more complex when there is a taxi strike, as well as during peak hours (from 07:00 to 09:00 and from 18:00 to 20:00). The results also show that the forecasts are more accurate on business days, being thus less accurate on weekends and holidays, in which there is a high percentage of frequency of observations in clusters #2 (57.21%) and #3 (68.21%). The previous reasons appear to be related to potential demand peaks that cause an imbalance between supply and demand. Figure 8 shows the percentage of frequency of observations per hour and cluster. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Cluster**} & **Summary** & **FARE** & **DIST** & **TTIME** & **DELAY** & **PREC** \\  & **Statistics** & **(EUR)** & **(Km)** & **(min)** & **(min)** & **(mm)** & **(mm)** \\ \hline \#1 & Mean & 18.57 & 11.35 & 18.47 & 4.60 & 0.14 \\ (Low error) & SD & 7.29 & 5.01 & 5.51 & 3.30 & 1.66 \\ \#2 & Mean & 20.90 & 9.74 & 17.02 & 4.31 & 0.14 \\ (Medium error) & SD & 11.52 & 5.08 & 5.17 & 2.95 & 1.56 \\ \#3 & Mean & 23.38 & 10.24 & 17.93 & 4.62 & 0.21 \\ (High error) & SD & 16.38 & 4.83 & 5.35 & 3.51 & 2.07 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Relationship between the continuous variables and the formed clusters. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Cluster**} & **STRIKE** & **BUSNESS\_DAY** & **PEAK\_HOUR** \\  & **(Strike Is True)** & **(Business Day Is True)** & **(Peak Hour Is True)** \\ \hline \#1 (Low error) & 6.25\% & 71.06\% & 16.02\% \\ \#2 (Medium error) & 6.77\% & 42.79\% & 20.77\% \\ \#3 (High error) & 10.20\% & 31.79\% & 20.44\% \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Percentage of frequency of observations of the categorical variables within the formed clusters. Cluster #1 (Low Error) is the one with the highest number of observations, being the frequency of observations almost constant across hours of the day, ranging from 3.52% to 4.56%. Clusters #2 (Medium error) and #3 (High error) behave in quite different ways.