## 4 Machine Learning and LoRaWAN
### Supervised and Unsupervised Learning Techniques  
The study [31] analyzed the use of ML algorithms to predict the inter-arrival time of IoT packets. To improve LoRaWAN scalability and network performance, key ML methods were used, which included k-means clustering, Long Short-Term Memory (LSTM), NN, and Decision Trees (DTs). The authors address issues with high error rates on some devices by using profiling methods that produce predictions even when training data is not available. The study analyzes the effect of spreading factors (SF) on LoRaWAN network performance and evaluates several prediction models to estimate the SF. The findings show that for 77% of actual sequences, the inter-arrival timings could be predicted with a 3.5% error. This methodology involves packet processing, device profiling through clustering, and feature extraction, which is focused on Inter-arrival time and an ML pipeline. The study adopted a combined approach that combined supervised and unsupervised learning. The authors used the real-world dataset that was gathered from water metering end-devices (EDs) over a LoRaWAN network. The dataset contained more than 4 million packets. The collection includes 18 time series characteristics, such as payload size and inter-arrival time (IT) between packets. At a granularity of 10 min, sixteen features are gathered to represent frame counters, transmission counters, etc. The authors have implemented the algorithms on a MATLAB platform by utilizing the NN Toolbox, Statistics and ML Toolbox, and Clustering Toolbox available in MATLAB. Python-based libraries like Scikit-learn and Keras are also utilized for training and evaluating the performance of different ML algorithms. The study [42] focused on EE and addressed the challenges caused by the expansion of IoT networks, which are operating on unlicensed ISM frequency bands. The author proposed an algorithm that used LoRaWAN technology to optimize parameters such as data rate, SF, and TP while taking geographic data into account. The authors have used ML clustering techniques such as the K-means algorithm to select and deploy gateways based on end-node clustering. The authors have optimized SF in their methodology to balance communication range and data rate. The proposed method has also modified the TP according to the position of the gateways and the expected volume of traffic in the area. The paper has recommended the range of 14-20 dBm as an ideal TP range to provide effective and energy-saving coverage. The findings of the study showed that a significant decrease in EC and improved coverage have been observed in comparison to previous methods. The NS-3 simulator was used for evaluation, and the authors used geographic data from real maps for dataset generation. The study [43] focused on the issue of power consumption, specifically within the context of the LoRaWAN protocol used for IoT devices. To increase the battery life of IoT devices, the authors proposed a method that integrated ML algorithms with the low-power capabilities of LoRa technology. The authors used Support Vector Regression (SVR) and Deep Neural Network (DNN) techniques to reduce power consumption and extend battery life for LoRaWAN devices. The authors have evaluated the proposed solution by using the LoRaSim simulator and MATLAB tools. They utilized a dataset of LoRa packets generated by the simulator. The findings showed that the ML models have performed well. The study has also optimized the parameters of the LoRaWAN protocol, such as TP, SF, and duty cycle, to enhance efficiency. The authors also used multi-armed bandit and Q-learning approaches for resource scheduling and obtained improved results. The study [44] evaluated the impact of weather conditions on the scalability of LoRaWAN technology and emphasized the improvement of RSSI measurement accuracy. It has evaluated various statistical models, such as the conventional ARIMA, ML, and DL methods. The data set included the time series of RSSI measured by eight LoRaWAN transmitter nodes.