## 3 Methodology
### ML-Based RSRP and RSRQ Prediction Models
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Signal Strength/Quality** & **RSRP** & **RSRQ** \\ \hline
**Excellent** & \(-\)60\(--\)70 dBm & \(>\)\(-\)6 dB \\
**Good** & \(-\)70\(--\)80 dBm & \(-\)6\(--\)10 dB \\
**Medium** & \(-\)80\(--\)90 dBm & \(-\)10\(\sim\)\(-\)15 dB \\
**Weak** & \(-\)90\(--\)100 dBm & \(<\)\(-\)15 dB \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Signal status based on RSRP and RSRQ value. Elevation angle, \(\beta\), was calculated based on the height of BS's antennas, \(h_{\text{BS}}\), flight altitude, \(h_{\text{UAV}}\), and \(d_{2D}\), as:  
\[\beta=\arctan\left(\frac{h_{\text{UAV}}-h_{\text{BS}}}{d_{2D}}\right)+\alpha, \tag{5}\]  
where \(\alpha\) is the tilt angle of the BS's antenna as listed in Table 1. Note that the UAV flight height was always above the BSs' height in the measurement scenarios. Hence, the divisor in the above equation is always a positive number. In this step, to accelerate modeling speed, improve accuracy, prevent bias, and avoid other scale difference issues in the model fitting phase, the determined features were normalized. After preprocessing the data, the dataset contains the following information for 8457 samples: cell ID, 2D distance, elevation angle, RSRP, and RSRQ. Out of the latter, RSRP and RSRQ are considered the dependent variables, i.e., the goal of prediction. At this stage, ML was used to predict the RSRP and RSRQ values at different heights and distances. Supervised ML algorithms can look at independent variables in a dataset and predict a dependent variable based on the characteristics of independent variables, i.e., predict trends by using previously labeled data. In this study, the _Scikit_ library [39] was used for ML model training and evaluation. Since there are multiple independent variables and based on the distribution of the collected data, different methods have been used to develop prediction models for RSRP and RSRQ. These methods include LARS lasso, SVR, polynomial, and logarithmic methods. The LARS lasso method is implemented based on the LARS algorithm, which provides the full path of the coefficients along with the regularization parameter, and unlike the coordinated descent-based algorithm, yields an exact solution. SVR extends the support vector machine (SVM) method for solving regression problems. There are different implementations/kernels of SVR, such as epsilon, nu, and linear SVR. The fit time complexity of SVR kernels is high, e.g., in epsilon implementation, it is more than quadratic with the number of samples. Hence, based on the size of our dataset, the linear kernel has been selected for model training. The trained models by the LARS lasso and SVR methods can be represented as:  
\[\text{RSRP }or\ \text{RSRQ}=\theta_{0}+\theta_{1}\times d_{2D}+\theta_{2} \times\beta, \tag{6}\]  
where \(\theta_{0}\) is the intercept and \(\theta_{1}\) and \(\theta_{2}\) are coefficients that predict the impact of change on the \(d_{2D}\) and \(\beta\), respectively. One common strategy within ML is to use linear models trained on nonlinear functions of the data. This strategy maintains the fast performance of linear methods while letting them fit a broader range of data. The generated model with this approach depends on the degree of polynomials. For example, for second-order polynomials, the model can be presented as:  
\[\text{RSRP }or\ \text{RSRQ}=w_{0}+w_{1}\times d_{2D}+w_{2}\times\beta+w_{3} \times d_{2D}^{2}+w_{4}\times d_{2D}\times\beta+w_{5}\times\beta^{2}, \tag{7}\]  
where \(w_{0}\),..., \(w_{5}\) are the polynomial coefficients that are calculated and optimized by the utilized algorithm. However, for the cases where the data shows a curvy trend, the linear regression cannot produce very accurate results when compared to nonlinear regression. Therefore, as the third method, the logarithmic model has been used to model the nonlinear relationship between the independent variables, distance, and elevation angle, and the dependent variables, RSRP and RSRQ.