## 4 Results  
For this work we used the database of ref. [27] for training and testing of the subsystem. The database reports the capacity of a given parking lot and consists of the following fields: parking lot system, capacity, occupancy, date, and time. The size of the database is 35,717 entries divided in 30 parking lots. The period of data collection for most parking lots is from 4 October 2016 to 19 December 2016; however, some parking lots have a more reduced interval. The total number of data points collected per parking lot is shown in Figure 12a. In the database, parking data were acquired every 30 min; however, we use the data per day, as shown in Figure 12b. For prediction of parking spaces, we used several ML algorithms: AdaBoost, XGB, lasso, random forest, K-neighbors, support vector machine, and kernel ridge regression, and we denote by TAdBoost the modified AdaBoost algorithm by the use of Equation (5). All algorithms were trained using a split of the data: 80% for training and 20% for testing. We used 315 days of the database, and thus 63 days were used for testing. In Table 1 are shown the values used for the most common parameters in each algorithm. For a complete list of the parameters and the value used, please see scikit-learn library documentation in default values [28]. The evaluation of the algorithms using various metrics is presented in Table 2. According to the results, the TAdBoost algorithm performs better than all other methods in terms of R2 score, MAE, and RMSE. However, it has a higher MaxError than the other methods. AdaBoost has the best MedianAE, with 10.5, which is 3.099 units lower than the next best method, TAdBoost. However, TAdBoost has a consistently low error for most of the predictions. The curves in Figure 13 display a portion of the occupancy data series obtained from the database; only the best three methods are shown. It is apparent that the TAdBoost algorithm fits the actual occupancy curve more accurately. The data show a cyclic pattern that deviates around days 25-30, where all methods demonstrate poor performance. Also, \begin{table}
\begin{tabular}{l l l} \hline \hline
**Algorithm** & **Parameters** & \\ \hline AdaBoost & estimators = 550 & loss = quadratic \\ XGB & estimators = 500 & max depth = 4 \\ Lasso & alpha = 1.0 & \\ Random Forest & estimators = 100 & split quality = squared error \\ K-Neighbors & neighbors = 5 & distance metric = minkowski \\ SVR & kernel = Radial Basis & C = 1.0 \\ Kernel Ridge & alpha = 1 & kernel = linear \\ TAdBoost & estimators = 270 & loss = linear & c = 2.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters for the considered methods. Figure 12: (**a**) Number of data points per parking lot. (**b**) A sample of 30 days for a parking lot, showing the parking slots used per day. on day 26, most methods predict an increase that the actual data do not show, but the TAdBoost and the AdaBoost algorithms do not make this error and follow the actual trend. Figure 14, shows boxplots of the four best methods. The errors between prediction and actual measures were used as data. Most methods have a median of zero error; however, the TAdBoost method presents less variance but presents more outliers than the second best, AdaBoost. We simulate a network composed of a variable number of cellular phone requests to the server with fog and only cloud. The overall end-to-end delay of the system is approximated as the sum of the nodal processing delay, \(D_{drop}\), queuing delay, \(D_{queue}\), serialization delay, \(D_{ser}\), and propagation delay, \(D_{prop}\)[29]. The advancements in hardware and software have decreased the processing and serialization delay to microseconds, and the propagation delay is around 5 microseconds per kilometer. The queuing delay can be optimized using quality of service (QoS) techniques for prioritized data.