## 3 Methods
### User Interface  
The user interface (Figure 4) consists of receiving data from the user through a mobile application. In this application, user are asked for the location of the destination where they want to go and the time frame of the prediction; for now, only three locations are implemented as Parking one, Parking two, and Parking three (Figure 5a). The application shows the available parking lots of the selected destination and offers, in real time, the amount of space available in each parking lot. To this end, an Android mobile application was designed to establish communication with the fog node for parking space availability prediction (Figure 4). In addition, the application can save the location of the parked vehicle to facilitate its retrieval. To obtain predictions of parking space availability, users need to select a \"Choose place/time\" button in the app, to access a list of parking lot options. After selecting the desired parking lot, a second list appears for selecting the time period for which the prediction is requested. Once the user has made these selections, the information is sent to the fog node using Google's Firebase service [24; 25], which generates and sends the prediction back to the application for display. Figure 3: Adaboost training from a window of past samples. Figure 4 provides an example of the user interface of the application, where the current location of the mobile device is represented by a blue globe on the map. To access the  
Figure 4: Fog node app user interface. Figure 5: Drop-down lists for parking lot and time frame selection. (**a**) Parking lot list. (**b**) Frame time list. parking space availability prediction server, the user needs to tap on a \"Choose Place/time\" button located at the bottom of the application. This action will display two consecutive selection lists. The first list allows the user to choose one of the three available parking lots in the predictor, as shown in Figure 5a. Once the user selects the parking lot of interest, a second list will appear, showing the available time frames, as depicted in Figure 5. After selecting both the parking lot and the desired time frame, the options are sent to the fog node, and the button that was initially labeled as \"Choose place/time\" displays the predicted parking lot availability percentage on the right side of the button, as illustrated in the example shown in Figure 6. Algorithm 2 shows the procedure executed by the app, while Figure 7 illustrates the sequence diagram depicting a user's prediction request initiated by clicking the \"Choose place/time\" button. The diagram shows the flow of information, including parking lot preferences and time inputs sent to Google's Firebase for generating a prediction, which is then presented on the app's graphical user interface (GUI). ```
0: \"Choose place/time\" button clicked
0: Predicted parking space availability is displayed
1:
```
1:Initialization Choose parking lot from the displayed menu. 2: Choose time from the displayed menu. 3: Selected location and time are sent to fog Node via Google \"Firebase\"
4: Fog Node send calculated parking space availability prediction to App via Google's \"Firebase\"
5: Parking space availability prediction is displayed in App ```  
**Algorithm 2** Parking space availability prediction procedure  
An additional feature of the application is to save a location through the \"Save location\" button (Figure 8a), which can be used to save the location of the parking space where the vehicle has been left; this location will appear with a red balloon on the application map (Figure 8) and can continue to be seen while the mobile device is moving (Figure 9a,b), until the location is deleted by pressing the \"Clear location\" button (Figure 8c). If the location is  
Figure 6: Percentage availability of parking spaces prediction. not deleted, it can be shown centered on the map by pressing the \"Show location\" button (Figure 8b); the map centered on the saved location is shown in Figure 9c.