# Explainable Machine Learning for LoRaWAN Link Budget Analysis and Modeling
## 3 Implementation and Results
### Data Analysis and Result
RVM shares several similarities with SVM. Both models are known for their sparsity, meaning they rely on only a subset of the training data to make predictions. This sparsity is achieved through support vectors in SVM and relevance vectors in RVM. Additionally, both models employ the kernel trick to transform input features into a higher-dimensional space, enabling them to effectively handle complex, non-linear relationships in the data. RVM achieved an RMSE of 7.19 dBm and, by far, took the longest to train and tune. The number of model parameters in SVR and SVM are not pre-determined and depends on the number of support/relevance vectors. On average, trained SVM and RVM both had about 2000 parameters, mainly influenced by the number of support and relevance vectors identified during the training. The application of the KNN yielded an RMSE of 6.7 dBm. Through the process of hyperparameter tuning, the optimal number of neighbors was determined to be 7. Additionally, a significant enhancement in the prediction accuracy was achieved by weighing the influence of each neighbor. This weighing was based on the inverse of their distance to the point being estimated. In this case, closer neighbors of a query point will have a greater influence than neighbors who are further away. KNN essentially stores or memorizes the entire dataset, and although providing good accuracy, it is computationally memory intensive, especially when the dataset has a considerable size. However, this is not a concern as the entire dataset (even including the holdout) is taking under 1.6 MB. DT does not have model parameters like that of MLP, and the learning is embedded within the structure of the tree. This characteristic stands as one of the key advantages of DTs, as it renders the model more easily interpretable. The inherent transparency of DTs enhances their capabilities in XAI, offering deeper insights and a clearer understanding of the decision-making process. The tuned model achieved an RMSE of 6.54 dBm and had 188 leaf nodes and 187 branches. This DT is too large to visualize here; therefore, Figure 3 visualizes a pruned version of the original tree. Please note that since the tree is heavily pruned, some of the features are not present in this visualization. Furthermore, each node is color coded based on the value of the RSSI. RF is an ensemble of multiple DTs, with each tree being trained on a bootstrapped random subset of the training set, and an averaging process is used to aggregate the output of all these trees for more accurate and stable results. RF is a good starting point for ensemble methods due to their simplicity and effectiveness. Tuned RF converged to an RMSE of 5.70 dBm with 100 estimators (decision trees). This was achieved without limiting the maximum depth of the DTs. GR was also tried, as it used DTs as its base estimator. However, GR creates DTs one at a time, where each new DT helps to correct  
Figure 3: Visualizing a heavily pruned version of the trained DT model to estimate LoRa’s propagation. errors made by the previous ones. The GR, with 79 estimators and a maximum depth of 7, achieved the best RSME of 5.53 dBm. Tree-based models, such as RF and GB, are known for their interpretability. This stems from their ability to naturally partition the feature space, which enables an in-depth examination of the impact and importance of each feature. Additionally, these models facilitate the analysis of partial dependencies, allowing us to understand how changes in feature values influence the target variable. This level of interpretability is particularly useful in gaining insights into how different features drive the model's predictions. The importance and impact of the topographical features are demonstrated in the LoRa's estimated propagation model in Figure 4. Where the location (latitude, longitude, and altitude) has the highest impact, followed by the height difference between BSs and the MS. SF has a 3% contribution to the estimation.