## 3 Methodology
### Experiment Setup  
The network traffic dataset comprises five key parameters, which are signal strength, latency, resource allocation, required bandwidth, and application type. We used the following preprocessing procedures to prepare the data for supervised learning and simulation:  
Figure 3: Training and validation loss (MSE) curves for the BRFFNN over 500 epochs using Bayesian regularization. The best training performance was achieved at epoch 478. Figure 2: The FFNN structure. 1. Text Conversion to Numeric: Fields with the values, for example, \"30 ms\", \"500 Kbps\", and \"80%\" were stripped of their units and changed to numeric values;
2. Data cleaning: Rows with invalid or missing entries were eliminated. To prevent ordinal bias, one-hot encoding was applied to the Application_Type categorical column;
3. Normalization of Features: Numerical features were standardized using Z-score normalization based on Equation (2). In order to balance model complexity and accuracy, the BRFFNN's dimensions were chosen using a grid search with five-fold cross-validation. Three hidden layers with five, ten, and fifteen neurons, using sigmoid activation, demonstrated the best trade-off between training stability and prediction accuracy out of several architectures that were tested (2-5 hidden layers, 5-50 neurons per layer). As illustrated in Figure 3, training was limited to 500 epochs and converged at epoch 478 using Bayesian regularization with an adaptive learning rate of 0.01 to avoid overfitting. Likewise, cross-validation was used to refine the gradient boosting model, and the final parameters were as follows: learning rate = 0.1, 150 estimators, max depth = 3, and a subsampling rate of 0.8. The key hyperparameters for each machine learning model are shown in Table 1.  
These parameters are used to train the LSGB and BRFFNN models to estimate the optimized bandwidth allocation. The ML models were specifically designed to enhance communication within the UAV-GS system. Two machine learning models, LSGB and the BRFFNN, are used to predict the bandwidth allocation and test it according to the 5G requirements. The simulation involved a configuration of one UAV and GS, each with distinct properties such as speed, position, name, packet size, inter-arrival time, and bandwidth requirement. The QoS performance was tested for two UAV movement scenarios: circular and random. The ground station (GS) is at the center of the UAV's circular trajectory to simulate use cases where UAVs monitor or orbit a specific ground target (such as a base station or disaster site). The circular trajectory ensures consistent coverage within a fixed area. The following defines the UAV movement:  
\[\mathrm{x(t)}=X_{GS}+\mathrm{rcos}(\omega\mathrm{t}) \tag{3}\]  
\[\mathrm{y(t)}=Y_{GS}+\mathrm{rsin}(\omega\mathrm{t}) \tag{4}\]  
where  
\(\mathrm{r}~{}=~{}200\) m, and \(\omega\) is set so that the UAV completes one complete orbit in the 150 steps of simulation time. \begin{table}
\begin{tabular}{c c} \hline \hline
**Model** & **Key Hyperparameters** \\ \hline \multirow{4}{*}{BRFFNN} & - Hidden layers: 3 (5, 10, and 15 neurons) \\  & - Activation: Sigmoid \\  & - Training algorithm: Bayesian regularization backpropagation \\  & - Learning rate: 0.01 (adaptive) \\  & - Epochs: 500 (best at epoch 478) \\ \hline \multirow{4}{*}{Gradient Boosting} & - Learning rate: 0.1 \\  & - Number of estimators: 150 \\ \cline{1-1}  & - Max tree depth: 3 \\ \cline{1-1}  & - Subsampling rate: 0.8 \\ \cline{1-1}  & - Loss function: Least squares \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Machine learning models with key hyperparameters. In a different scenario, UAVs use a bounded random path to move in a 2D plane. The UAV position is updated with a random step (\(\pm\)5 units) in both the X and Y directions at each time step. This movement simulates dynamic real-world situations like GPS noise, wind drift, and adaptive mission changes.