# RSSI and Device Pose Fusion for Fingerprinting-Based Indoor Smartphone Localization Systems
## 4 Results and Analysis
### KNN, NB and NN Localization Results for Proposed Framework  
To demonstrate the robustness of the framework, it was also implemented on the K-nearest neighbor (KNN) and Naive Bayes (NB) supervised learning algorithms and trained and tested for 100 randomized runs. The hyperparameters of the algorithms were optimized using MATLAB's hyperparameter optimizer for KNN and NB. The results of  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Framework** & **Algorithm** & \begin{tabular}{c} **Accuracy (\%) Average** \\ **[Min,Max]** \\ \end{tabular} & \
\begin{tabular}{c} **Training Time (s)** \\ **Average [Min,Max]** \\ \end{tabular} &
\begin{tabular}{c} **Testing Time (s)** \\ **Average [Min,Max]** \\ \end{tabular} \\ \hline RSSI-Only & KNN & 74.3 [73.8, 74.9] & 0.043 [0.038, 0.260] & 0.745 [0.657, 0.888] \\  & NB & 66.2 [65.5, 66.7] & 0.024 [0.019, 0.301] & 0.014 [0.011,  
the RSSI-only and RSSI-and-device-pose accuracy percentages are shown in Table 4, which also summarizes the neural network (NN) results given earlier. The results in Table 4 indicate that the RSSI-and-device-pose framework produced a consistent accuracy increase regardless of the algorithm implemented. The accuracy increase produced by the RSSI-and-device-pose framework was lower when implemented with KNN and NB. The lower rates of improvement for KNN and NB could be due to the following reasons:  
* KNN relies on the Euclidean distance, so its performance typically degrades in higher-dimensional spaces (i.e., the curse of dimensionality). As depicted in Figure 4, when the device pose was added to the RSSI vector, the input vector increased in dimensionality. Thus, for KNN, the RSSI-and-device-pose performance could be expected to be lower than that of RSSI-only. However, we found that the performance was slightly higher, indicating that useful information for a better model existed in the combined RSSI-and-device-pose input vectors.
* The naive assumption of the NB algorithm presumes that the components of the input vector are independent. However, this is almost certainly untrue because any movement (e.g., in the dynamic files) affects the correlation between the anchor RSSI readings; and, importantly, the device pose affects the RSSI. It is possible that because the naive assumption does not hold for the additional features in the RSSI-and-device-pose vector, the accuracy improvement is low.  
The processing time for the 100 randomized runs for both the training and testing stages of the algorithms was measured using MATLAB's internal timing functions and the results are given in Table 4. The results demonstrate an increased computational cost associated with the RSSI-and-device-pose framework but to various degrees for the different algorithms. The KNN implementation for the RSSI-and-device-pose framework required, on average, around double the computational time for training and testing compared with the RSSI-only framework; NB required, on average, five times longer to train but was nearly the same time during the testing phase. For both frameworks, the KNN testing time was longer than the training time, a theoretical peculiarity of KNN [25]. As expected, the neural network implementation required the longest to train due to the backpropagation algorithm, which was iterated over the training epochs, but the average increase for the RSSI-and-device-pose framework was only 4.6%. The average difference in inference time for the testing dataset between the NN framework implementations was less than 1 s.