## 4 Machine Learning and LoRaWAN
### DL and NN Techniques and Models for LoRaWAN Performance Efficiency  
To maximize the energy efficiency (EE) in LoRa networks, the study [32] has proposed a DL approach that uses artificial neural networks (ANNs). The authors studied the optimal transmit power for maximization of EE. In their methodology, the authors have trained the ANNs twice with two datasets. First, the authors have used model-based data, and second, they trained the model with a real-world dataset that was obtained by Monte Carlo simulations. The study used the Poisson Cluster Process for stochastic geometry modeling for optimization of parameters such as SF, CR, and BW. Simulations are implemented in MATLAB, while real-world data training is performed with Microsoft Azure. Results demonstrated that ANNs have performed better with negligible gaps between partial and full optimum architectures. It was also observed that there is a possibility of freezing some layers during retraining without facing a major decline in performance. The study [33] proposed a novel deep learning-based resource allocation strategy using a Gated Recurrent Unit (GRU) to address resource management issues in large-scale LoRa-enabled device deployments. The GRU-based method predicted and reduced packet loss caused by incorrect SF utilization. It solved the issue that occurred with LoRaWAN's ADR mechanism, which experiences difficulty adapting to sudden shifts in propagation settings. The technique pre-trains a GRU model to assign suitable SFs by combining offline and online modes, which results in an 11% increase in packet success ratio. The reason the authors chose GRU over other ML models, such as LSTM and SVR, was because it could adjust to different input sequence lengths. The suggested approach has shown better performance when compared with current techniques, and experiments were carried out in Python using TensorFlow and Keras frameworks with data from a simulated LoRaWAN network. This study [34] has addressed the issue of packet loss caused by inefficient use of SFs. The authors stated that current resource allocation approaches such as ADR and BADR are not sufficient to address the problem of massive packet loss. The authors presented a novel approach, AI-ERA, that is based on a DNN-based resource allocation strategy. AI-ERA improves packet success rates (PSRs) for both stationary and mobile IoT applications by using AI to predict optimal SFs based on dynamic channel conditions. AI-ERA maximized the PSR through offline training and online prediction modes and used the NS-3 simulator. The proposed strategy has allocated the predicted SFs to end devices in a proactive manner. The results showed that AI-ERA is more effective at improving SF management than traditional ADR techniques.  
The study [35] has proposed an ML technique based on NN to enhance the accuracy of indoor localization within the LoRaWAN network. The authors stated that there is a primary challenge in the variability in signal strength that is caused by environmental factors, and this causes more energy to be consumed by devices. Their proposed solution is based on the train-then-test methodology, where supervised learning is utilized to build a ML model for each indoor location area. The authors optimized TP, CR, SF, and BW parameters by selecting the minimum values that still meet the required accuracy level for device localization. They have predicted the optimal values of these parameters by using machine learning-based signal strength prediction that has reduced energy consumption while maintaining an accuracy of 98 percent.