## 5 Machine Learning Algorithms for SDN
### Routing Optimization  
Mathematical optimization or optimization is selecting the best decisions or choice or selection regarding some measure, model or criterion, from some set of available choices. Optimization has been used in different fields including, optimal route recommendation [147], optimal policy-making [148], energy optimization [149], to name a few. Routingis one of the primary functionality of a network; the SDN controller manages the routing functionality of traffic flow by modifying the network devices' flow tables such as routers and switches. SDN controller may guide a network device to route a traffic flow through specific paths, or it may also decide to discard a specific type of traffic. Inefficient decisions related to traffic flow can affect the SDN network's performance in terms of network overload and transmission delay. There are two types of algorithms used for routing optimization: shortest path first and heuristic algorithms. Shortest path first algorithms are simple best routing protocols, but it does not enhance the network resource utilization [150]. On the other hand, heuristic algorithms best utilize the network resources with a high computational cost [151]. SDN controller devises policies for each routing flow. Machine learning is used widely to overcome the issues of routing optimization using fast near-optimal routing solutions. These routing optimization issues are considered decision-making tasks; hence, machine learning approaches such as Reinforcement Learning (RL) perform well for routing optimization. In RL-based routing optimization approaches, the controller is considered as an agent and the network as the platform. The state-space consists of network and traffic states. Actions represent routing solutions, and the agent rewards are devised based on optimization metrics such as network delay and throughput. A distributed intelligent protocol for routing in SDN network using RL is proposed in paper [152]. In paper [153], a routing optimization algorithm in the domain of SDN-based inter-data center overlay network is proposed. A time-efficient QoS aware adaptive routing technique to forward the adaptive packet by using RL algorithms is proposed in paper [154]. The proposed approach selects a routing path with maximum QoS aware reward according to the user applications and traffic types. Literature also presents studies based on supervised learning techniques for routing optimization. Supervised learning-based routing optimization considers network and traffic states as the input of a training dataset. The routing solution of the heuristic algorithm is considered the output of the training dataset. Learning based on supervision can lead to optimal routing solutions like heuristic-like routing. In [151] dynamic routing based on supervised learning called NeuRoute is proposed. In NeuRoute, the long short-term memory (LSTM) part is used to estimate future traffic. The estimated network traffic and network state are used as input, and output is the results of the heuristic algorithms to a neural network model. The neural network is trained using these input and output data to predict heuristic-like results. Prediction process involves predictive modeling using regression models to predict the likelihood of an outcome. Predictive modeling is usually practiced in the domain of machine learning and artificial intelligence [155; 156]. On the other hand, predictive analytics is used to predict the outcome of undiscovered future events using modeling and machine learning techniques from current data to predict future problems. Predictive modeling is used in literature for real-life potential applications [157; 158; 159; 160]. Traffic prediction is an important research topic in the field of routing optimization. Traffic prediction used to predict the patterns of network traffic volume using analysis of historical traffic data [161].