## 4 Simulation Results and Analysis
To find the best loss function, we analysed the effect of different loss functions and Figure 12 shows their performance. From Figure 12, the MSLE loss function shows a slightly better performance than MSE but much better performance than MAE loss function. However, the MSLE loss function has high possibilities to overfit and is commonly used to predict large values. The results from MSE are slightly similar to MSLE and it has a lower probability to overfit. The performance and convergence behavior of our model suggests that MSE loss function is a good match for training the LSTM network for our  
Figure 9: UWB anchors & tag positions. regression problem. The results from the MAE loss function shows that it is not a good fit for our LSTM model. Another important hyperparameter that affects the performance of the LSTM model is the batch size and it plays a major role in training the model faster. The batch size controls the amount of data samples that will be propagated through the LSTM networks. If we use a larger batch size to train the model, it increases the computational speed of the training data. However, a large batch size leads to poor generalization and the learning process converges slowly. Figure 13 shows the localization accuracy and network loss of training data in terms of the batch size. Figure 10: Localization accuracy of training data with different learning rates. Figure 11: Performance of different optimizers for the LSTM model. Figure 12: Performance of different loss functions. From Figure 13, it can be seen that the lower batch size values give a learning process that converges quickly. The lower batch size value also uses less memory for training. Since the network is trained by fewer samples, the overall training procedure requires less memory. However, the lower value of batch size is not guaranteed to converge to the global optima. In our simulation, we used the batch size as 5 without any computational constraints. The performance of LSTM model also depends on the number of hidden nodes. The number of hidden nodes depend on the complexity of the dataset, number of input features, number of data points and the data generating process. To find the optimum number of hidden nodes without overfitting, the following expression is used. \[N_{h}=\frac{N_{s}}{(\alpha\times(N_{i}+N_{o}))}, \tag{31}\]  
where \(N_{i}\) is the number of input neurons, \(N_{o}\) is the output neurons, \(N_{s}\) is the number of samples in training data and \(\alpha\) is the arbitrary scaling factor usually 2-10. Figure 14 shows the localization accuracy and network loss of training data in terms of number of hidden nodes. Figure 13: Localization accuracy and network loss of training data in terms of number of batch size. In Figure 14, the localization accuracy during the training in terms of epochs with varying hidden nodes from 16 to 512 with batch size of 5 is shown. If we use few hidden nodes, the result shows a high training error and high generalization error due to underfitting. On the other hand, for the high number of hidden nodes, the result shows low training error and high generalization error due to over fitting. Through our several simulation results, we obtained the number of hidden node as 256. The localization accuracy of training data for different timesteps also affects the performance of LSTM model. It is necessary to analyse the performance of different timesteps for better localization accuracy. The overall performance of the model increases with increase in timesteps. The timestep is equivalent to the amount of timestep runs the LSTM model. Figure 15 shows the localization accuracy and network loss of training data in terms of timestep. Figure 14: Localization accuracy and network loss of training data in terms of number of hidden node. From Figure 15, it is clear that the higher timestep gives better accuracy and lower network loss. When we increase the timestep value from very low to high, the network converges quickly without any overfitting problems.