# A Survey on Machine-Learning Techniques for UAV-Based Communications
## 1 Introduction
### Artificial Intelligence and Machine Learning  
AI has been considered the science of training machines in order to perform human tasks. There are many applications that AI has been involved in, including robotic vehicles, speech recognition, machine translation, and recently wireless communications. Moreover, a specific subset of the AI is the techniques that are used for training machines in how to learn, which originates a new framework known as ML. In this context, ML can provide solutions in scenarios where a massive number of devices simultaneously requires access to the network's resources in a dynamic, heterogeneous, and unpredictable way, e.g., in IoT communications. In this sense, intelligent management should be performed in the entire network in order to cope with the various demanding requirements of this novel type of services. The scope is to adaptively and in real-time manage the network resources in an optimal manner. Therefore, ML algorithms have been proposed as an efficient approach for confronting all these contradictory challenges coming from the IoT ecosystem.  
In general, ML is based on the pattern recognition framework and its main idea is to exploit correlation among a set of data and/or past good action sequences for adapting to the environmental changes without any kind of human intervention. Clearly, the advantage offered by the ML framework in the wireless networks operation is that it will enable network elements to monitor, learn, and predict various communication-related parameters, such as wireless channel behavior, traffic patterns, user context, and devices locations. ML is classified into various categories, such as supervised learning, semi-supervised learning, unsupervised learning, and reinforcement learning (RL) [21].  
* **Supervised learning:** In supervised learning, the algorithms use data sets, in which both the input and the desired output are available. Therefore, this kind of algorithm can only be employed in scenarios where enough labeled data are available to be exploited.
* **Unsupervised learning:** The unsupervised learning algorithms also require data to be available for training, which, however, do not include labeled output. Therefore, in this type of learning, clustering or pattern discovery is performed on the available data.
* **Semi-supervised learning:** An intermediate approach regarding the nature of the available data has been followed with the semi-supervised learning algorithm. In this type of learning, both labeled and unlabeled data are exploited for the training.
* **Reinforcement learning:** In RL, the problems are solved by employing a sequence of actions that use the trial and error rule. Therefore, the main idea of this type of learning is radically different as compared to the previous mentioned ones, which exploit historical data. Instead, RL algorithms are trained by the previous taken decisions towards solving the problem. The RL algorithms are used in various scenarios in the area of wireless network optimization.  
In addition, a specific class of ML is deep learning (DL). In DL, multiple layers have been employed in order to build an artificial neural network, which is able to make intelligent decisions without any kind of human intervention. DL algorithms can be applied when limited manual interference is necessitated, with the cost of higher computational requirements. Nevertheless, AI, ML, and DL methods have been widely employed in various wireless communications scenarios for improving a numerous parameters of the network.