# On Analyzing Routing Selection for Aerial Autonomous Vehicles Connected to Mobile Network
## 5 Test Results
### ML Algorithms and Hypothesis Space of U(d)  
The Machine Learning algorithms ML\({}_{1}\) and ML\({}_{2}\), implement in the first layer two well-known resource usage prediction models: An epidemic model defined in [28; 29] and a model based on Autoregressive Integrated Moving Average (ARIMA) that assumes that the throughput follows a Gaussian distribution. The ARIMA model that we implemented is presented in Section 3.3 of the paper [30]. In the second layer of the ML algorithm, it is implemented a weighted average algorithm where the average value is a parameter that must be trained, see Figure 5. At last the Loss function in training process is the difference of the throughput estimated by the ML and the throughput measured in the next 20 min. If the difference is bigger than \(\delta\), then the values of throughput estimated by each one of the models is compared with the measured throughput and the weight of the weighted average formula is corrected to give more weight to the most exact model. The loss function and optimizer is presented in Algorithm 1. ```
1:procedureLossFunc_Optimizer
2:\(\Delta\leftarrow\)! Estimated_throughput--Output_throughput! 3:case\(\delta>\Delta\)
4:exitNull
5:\(\Delta 1\leftarrow\) Epidemic_Model_throughput--Output_throughput
6:\(\Delta 2\leftarrow\) ARIMA_Model_throughput--Output_throughput
7:weight\(\leftarrow\Delta 1/\Delta 2\)
8:exitweight
```  
**Algorithm 1**Loss Function and Optimizer  
The algorithm minimizes the error of the estimated output by selecting the incidence of epidemic and ARIMA prediction algorithms in the final result. ML\({}_{1}\) may adjust different weight for each operator, since each operator may have a different policy or policies that make resource usage prediction behaves in a different way. So, ML\({}_{1}\) (as well as ML\({}_{2}\)) are trained with only the input data of one operator. Figure 4: Input and Output data of ML\({}_{1}\). Input data are throughput and round-trip delay (RTD) (1 min). Output is throughput (20 min). The values of!input1,input2,output? for this concrete sample are:!11.2 Mbps,242 ms; 9.3 Mbps\(\times\). Figure 5: Scheme for ML\({}_{1}\) and ML\({}_{2}\). ML\({}_{3}\) uses the same prediction models, however the input and output data in this case are the measurements including both the links, i.e., from UAV to control station. For this, we send the messages from control station to the UAV instead to the server in the network operator. Since, in the case of ML\({}_{3}\) training, the measurements are taken in UAV, they are the same as in ML\({}_{1}\), i.e., data throughput and the round-trip delay of signaling messages, subject to operator in link 1 is the same than operator in link 2 (in order to avoid inter-operator roaming). Let us remark that the ML\({}_{3}\) has been created only for selecting the optimal function \(U(d)\), so ML\({}_{3}\) will be run only during the training phase. Afterwards, during the normal flight of the drone, only ML\({}_{1}\), ML\({}_{2}\) and \(U(d)\) will obtain the best routing for each new connection. At last, the function \(U(d)\) should be selected such that \(U[f_{1}(\text{ML}_{1})f_{2}(\text{ML}_{2})]\approx f(\text{ML}_{3})\). \(U(d)\) is a function that selects the routing in link 1 and link 2, so, in our case it is the selection of the operator that will serve the connection. The inputs of \(U(d)\) are the estimated values of throughput in link 1 (calculated by ML\({}_{1}\)) and in link 2 (calculated by ML\({}_{2}\)) for each one of the operators: \(Est_{Thrlink, operator}\). The output of \(U(d)\) is a value from 1 to 3 (one of the three operators).