## 3 Methods
### Module for Occupancy Prediction  
This study proposes a fog module that utilizes a machine learning regressor to predict the availability of parking spaces over time. This fog module has the potential to significantly enhance the efficiency of parking space management in cities, resulting in reduced traffic congestion and improved accessibility for drivers. The fog module consists of two subsystems: the user interface management subsystem and the prediction subsystem. Additionally, it incorporates fog storage to save recent historical data on parking usage for the last seven days. These subsystems are depicted in Figure 2. The user interface management subsystem receives data from the user application. The prediction subsystem receive requests for prediction from the user interface management subsystem and uses recent historical data to return predictions. The prediction subsystem uses the AdaBoost  
Figure 1: Architecture of the proposed system based on fog computing. regressor to forecast parking space availability for a given date. Parking data are also transferred to the cloud for storage and statistical management via the cloud analytics module. This module determines the need to retrain the regressor based on the error rate. In the present investigation, we proposed utilizing past parking occupancy information for prediction, which is represented as a sequence of data over time, \(S=\{S_{n}\}_{n=1}^{N}\), where \(S_{n}\) is the parking occupation at time slot \(n\). In addition, we incorporate features, \(f_{n}\), linked to each component of the sequence, \(S_{n}\), which expands the dataset as \(S_{e}=\{(S_{n},f_{n})\}_{n=1}^{N}\). Moreover, we consider the traditional autoregressive model of order \(I\) as a base model, which is given by  
\[S_{n+1}=\sum_{i=0}^{I}\beta_{n-i}S_{n-i}+e_{n}, \tag{1}\]  
\[S_{n+1}=\beta_{n}S_{n}+\beta_{n-1}S_{n-1}+...+\beta_{n-I}S_{n-I}+e_{n}. \tag{2}\]  
From this, we also propose to use the AdaBoost algorithm as a generalization to the classic model, similar to the neural autoregressive model of [22], and we express this as follows,  
\[S_{n+1}=\text{AdaBoost}(S_{n},S_{n-1},...,S_{n-I})+e_{n} \tag{3}\]  
where \(e_{n}\) is white noise with zero mean and variance \(\sigma_{e}^{2}\). In (3), the features are the samples taken backwards according to the order of the model \(I\), \(f_{n}\) is the set with elements \(S_{n},S_{n-1},...,S_{n-I}\), and \(\text{AdaBoost}(\cdot)\) is a function that combines the output of \(R\) number of regressors according to the AdaBoost regression algorithm. The formula for calculating the output, \(S_{n+1}\), is as in [18]  
\[\text{Adaboost}(f_{n})=\inf\left\{y\in Y:\sum_{t:h_{t}(f_{n})\leq y}\log(1/ \beta_{t})\geq\frac{1}{2}\sum_{t}\log(1/\beta_{t})\right\}, \tag{4}\]  
where \(h_{t}(\cdot)\) are weak regressors, and each \(\beta_{t}\) depends on the error, \(e_{t}\), of regressor \(t\), which are calculated in the training phase. In this work, we also propose to calculate the output of the regressor using the [PERSON]'s biweight location estimator [23]. The median, on which Equation (4) is based, is a resistant  
Figure 2: The proposed system: featuring a fog module for processing user requests, highlighting the iterative interactions between subsystems. estimate, but it has only moderate robustness of efficiency. However, the biweight location estimator is resistant with robust efficiency. The formula for the biweight is given by  
\[\text{Adaboost}(f_{n})=h^{*}=\frac{\sum_{t}w_{t}h_{t}(f_{n})}{\sum_{t}w_{t}}, \tag{5}\]  
where  
\[w_{t}=max(1-(\frac{h_{t}(f_{n})-h^{*}}{cS})^{2},0)^{2} \tag{6}\]  
and \(S\) is the median of the set \(\{|h_{t}(f_{n})-h^{*}|\}_{t}\), and \(c\) is a parameter of the algorithm. Note that the value \(h^{*}\) of the estimator is computed iteratively. As far as we are aware, no previous research has proposed the biweight with the AdaBoost regressor, particularly in the context of parking prediction.