# Machine Learning-Based Methods for Enhancement of UAV-NOMA and D2D Cooperative Networks
## 1 Introduction
### Contributions  
As presented in the previously detailed literature review, several studies on standalone UAV networks utilize unsupervised machine learning methods such as k-means and k medoids to place the UAV in the region of interest. However, applying these algorithms individually to a UAV-NOMA and D2D cooperative network might degrade the overall network quality while rendering the D2D network unnecessary. Hence, to achieve enhanced network quality, it is vital to consider the interactions and trade-offs between the two algorithms and the network elements and adopt an integrated approach [7; 24]. Concerning the operation of the two placement methods, both k-means and k-medoids are centroid-based clustering techniques. The two methods are fed with the terrestrial users' coordinates as an input feature to find the point where the UFBS should be placed. In such scenarios, k-means behaves well when the terrestrial users form spherical clusters without outliers [24]. In contrast, k-medoids is robust to the outliers and correctly represents the cluster center [7]. Hence, by efficiently combining k-means and k-medoids algorithms, the UAV can be positioned in the most suitable location to ensure effective coverage for D2D communication. This combined approach considers both the similarities in the data points as well as the actual data points themselves and potential outliers or noise in the data. As a result, it leads to a more precise and reliable UAV placement. Thus conspicuously, the combination of these two algorithms exploits the strengths of both k-means and k-medoids in determining the ideal UAV placement [25]. Nevertheless, whenever the UFBS needs to be relocated, it is necessary to determine the most suitable placement method by comparing the results obtained from both clustering algorithms, i.e., k-means and k-medoids. This decision-making process requires the real-time execution of both ML methods, thus increasing the overall time complexity. Also, k-means and k-medoids are clustering algorithms that can be used to group data points together based on their similarities. However, deciding which algorithm to use can be complex and may depend on several factors. Essentially, when the dataset contains non-spherical clusters, outliers, or clusters of different sizes, it is difficult to model a decision-making approach with a simple threshold boundary. Hence, this can make it challenging to identify the unsupervised ML method that should be utilized. Inspired by this observation, the placement scheme selection (PSS) can be regarded as a supervised classification problem, which can be handled through a fully connected artificial neural network (ANN) to enhance the overall system QoS. ANNs can be used to predict which clustering algorithm to use between k-means and k-medoids because they are able to learn the underlying patterns in the data and identify which algorithm is better suited for the given dataset. Moreover, ANNs can capture complex relationships between the input data and the output cluster labels, which can be difficult to model with a simple threshold boundary. Consequently, this paper presents and analyzes an ANN-based UAV placement scheme to enhance the network performance of an integrated UAV-NOMA and D2D cooperative network. The proposed method intelligently integrates the UFBS into the cooperative network by efficiently combining the k-means and k-medoids unsupervised ML algorithms. Concerning the UAV-NOMA and D2D cooperative network, pairs of users are simultaneously served through the UFBS, which utilizes a NOMA optimal user pairing and power allocation strategy. At the same time, terrestrial cooperation is enabled by adopting the D2D communication paradigm, thus improving the overall communication quality. To the authors' knowledge, this is the first time supervised machine learning techniques, such as the ANN, and unsupervised machine learning algorithms, such as k-means and k-medoids, are combined to improve the integrated UAV-NOMA D2D cooperative network.