# RSSI and Device Pose Fusion for Fingerprinting-Based Indoor Smartphone Localization Systems
## 4 Results and Analysis
### RSSI-Only vs. RSSI-and-Device-Pose Neural Network Cross-Entropy Results  
In this subsection, the results and analysis for a sweep of the hyperparameters of the RSSI-only and RSSI-and-device-pose neural networks are provided. Due to the low dimensionality of the data (6 dimensions of anchors in the case of the RSSI-only localization network and a maximum of 10 dimensions for the 6 anchors and 4 device poses in the case of the RSSI-and-device-pose localization network), a single hidden layer was used  
\begin{table}
\begin{tabular}{l l l l l l l l l} \hline \hline
**Static/Dynamic** & **Zone** & **Anchor 1** & **Anchor 2** & **Anchor 3** & **Anchor 4** & **Anchor 5** & **Anchor 6** & **Total** \\ \hline Static & A and B & 2 & 1 & 0 & 0 & 1 & 2 & 6 \\  & A and C & 0 & 0 & 0 & 0 & 1 & 0 & 1 \\  & A and D &  
for both the RSSI-only and the RSSI-and-device-pose neural network. The entire collected dataset (57,489 vectors) was randomly split into 80% for training and 20% for validation. Using the training-only and validation-only data, a sweep of the number of hidden neurons (5 to 250 hidden neurons in 5 neuron increments) for both the RSSI-only and the RSSI-and-device-pose networks was conducted for 1000 training epochs. Both neural networks were presented with the same training and validation vector dataset and trained using the standard backpropagation algorithm. In general, during training, the measurement vectors from the training set \(V^{train}=\{\vec{v}_{1},\vec{v}_{2},\dots,\vec{v_{w}}\}\), whose ground truths were \(Y^{train}\), were sequentially applied to the neural network whose weights were randomly initialized. The pre-softmax output vector of the neural network \(\vec{O}\) was then used to calculate the average cross-entropy (\(Loss_{\text{CE\_TR}}\)) of the classification (the \(Loss_{\text{CE\_VAL}}\) can be calculated with the same equation using the validation dataset instead):  
\[Loss_{\text{CE\_TR}}=\frac{\sum\limits_{s=1}^{w}Loss_{s}}{\left|V^{train} \right|}=-\frac{\sum\limits_{s=1}^{w}\overline{\hat{T}}_{s}^{train}\cdot\ln \left(\vec{O}_{s}\right)}{\left|V^{train}\right|}=-\frac{\sum\limits_{s=1}^{w} \sum\limits_{j=1}^{k}T_{j}^{train}\ln\left(P(O_{j})\right)}{\left|V^{train} \right|} \tag{2}\]  
As the natural logarithm function has a range of \((-\infty,0]\) over \([0,1]\), the higher the probability for a given class \(P(O_{j})\), the lower the cross-entropy value. Generally, the lower the average cross-entropy value, the better the model learned, though overfitting may occur. When overfitting happens, the training loss function \(Loss_{\text{CE\_TR}}\) continues to decrease; however,the validation loss function \(Loss_{\text{CE\_VAL}}\) starts to increase as the neural network overlearns the training vectors and loses generalization ability to correctly classify the validation vectors. One way to recognize overfitting is to evaluate the disparity between the training and validation performance (\(Loss_{\text{CE\_TR}}-Loss_{\text{CE\_VAL}}<0\)). The \(Loss_{\text{CE\_TR}}\) and (\(Loss_{\text{CE\_TR}}-Loss_{\text{CE\_VAL}}\)) for both the RSSI-only and the RSSI-and-device-pose neural networks are shown in Figures 10 and 11 (note, the \(Loss_{\text{CE\_TR}}\) is plotted for epochs \(>\)20 due to scale, and the \(Loss_{\text{CE\_TR}}-Loss_{\text{CE\_VAL}}\) is plotted as a five-sample moving average to smoothen the discontinuities for the hidden neuron sweep). From these training parametric runs, it was observed that the RSSI-and-device-pose localization network always achieved a lower \(Loss_{\text{CE\_TR}}\) at earlier epochs than the RSSI-only localization network and with fewer neurons. In fact, the RSSI-and-device-pose localization network achieved \(Loss_{\text{CE\_TR}}\) values of 0.11 and 0.09 (black contours in Figure 11), which the RSSI-only localization network was unable to reach within the range of hidden neurons and epochs. This was despite the higher dimensionality of input data, implying that a better localization model was learnt by the RSSI-and-device-pose localization network.