# Dynamic Vertical Mapping with Crowdsourced Smartphone Sensor Data
## 4 Evaluation
### Evaluation
#### 4.4.1 Building 1: TUM Main Campus  
TUM main campus has five floors and a ground floor. The true height for each floor is listed in Table 7. Nineteen datasets were collected from TUM main campus, over a 4 month period. The average duration of the datasets collected was 14.2 min, with an average of 3204 samples from the pressure sensor. All the collected datasets are available in [20]. We collected data from various hours during daylight and night; different routes were traveled inside the building, at different temperatures, humidity levels and ambient pressure, and finally with different cloud coverage. After smoothing and clustering the data as explained in Section 3.2, the OITransition was identified as described in Section 3.3. The accuracy of this component is presented in Section 4.3, in Table 4. Once the OITransition was estimated and the reference pressure was extracted, the altitude of every pressure reading that belonged to indoors was computed. Once all the pressure readings were translated into altitude, they were imported to the elbow method for floor number identification. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**GPS**} & \multicolumn{2}{c}{**Light**} & \multicolumn{2}{c}{**Magnetism**} & \multicolumn{2}{c}{**Fusion**} \\ \cline{2-9}  & **Indoor** & **Outdoor** & **Indoor** & **Outdoor** & **Indoor** & **Outdoor** & **Indoor** & **Outdoor** \\ \hline Indoor & 127 & 0 & 4963 & 154 & 7749 & 179 & 1,186,784 & 41,546 \\ Outdoor & 29 & 184 & 264 & 3788 & 1552 & 3571 & 13,700 & 924,258 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Confusion matrix of Building III. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**GPS**} & \multicolumn{2}{c}{**Light**} & \multicolumn{2}{c}{**Magnetism**} & \multicolumn{2}{c}{**Fusion**} \\ \cline{2-9}  & **Indoor** & **Outdoor** & **Indoor** & **Outdoor** & **Indoor** & **Outdoor** & **Indoor** & **Outdoor** \\ \hline Indoor & 614 & 21 & 6121 & 210 & 3323 & 519 & 1,162,298 & 302,269 \\ Outdoor & 21 & 696 & 163 & 5526 & 144 & 2776 & 1329 & 746,993 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Confusion matrix of Building I. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**GPS**} & \multicolumn{2}{c}{**Light**} & \multicolumn{2}{c}{**Magnetism**} & \multicolumn{2}{c}{**Fusion**} \\ \cline{2-9}  & **Indoor** & **Outdoor** & **Indoor** & **Outdoor** & **Indoor** & **Outdoor** & **Indoor** & **Outdoor** \\ \hline Indoor & 390 & 3 & 5748 & 1069 & 2911 & 460 & 1,228,507 & 25,114 \\ Outdoor & 20 & 805 & 220 & 4428 & 0 & 2383 & 6915 & 820,470 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Confusion matrix of Building II. As can be seen in the elbow method results, in Figure 15a, the number of floors (i.e., clusters, \(K=6\)) in our dataset has been identified correctly for the aggregated dataset as well as for the May and June datasets, for which all floors of the building were visited. The threshold selected for all datasets was 99.12% for the distortion percentage, and for the clustering, the K-means algorithm was selected. Additionally, it can be seen that for the February dataset, the number of floors predicted was five (\(K_{temp}=4\)), as the fifth floor was not visited during this month. For March, the predicted number of floors was four (\(K_{temp}=3\)), as the two highest floors were not visited during that month. For April, the predicted number of floors was three (\(K_{temp}=2\)). Finlay, in the datasets extracted during July, the predicted number of floors was four (\(K_{temp}=3\)), and the third cluster's distortion fell slightly above the 99.12% threshold.