# Enhancing Indoor Localization with Room-to-Room Transition Time: A Multi-Dataset Study
## 3 Material and Method
### Online (Learning-and-Test) Phase  
During the online phase, both the raw dataset and the combined datasets, which integrated the Wi-Fi signal strengths with the room-to-room transition times, were utilized to train various ML models for accurately predicting target rooms. The flowchart describing the online phase is shown in Figure 7. \begin{table}
\begin{tabular}{l l l l l l l} \hline \hline
**Room Pair** & \multicolumn{2}{c}{**Dataset 1**} & \multicolumn{2}{c}{**Dataset 2**} & \multicolumn{2}{c}{**Dataset 3**} \\  & **Distance** & **Steps** & **Distance** & **Steps** & **Distance** & **Steps** \\ \hline Kitchen–Livingroom & 895 & 13 & 797 & 11 & 1210 & 23 \\ \hline Kitchen–Bedroom & 1090 & 18 & 1066 & 15 & 1095 & 21 \\ \hline Kitchen–Hall & 777 & 13 & 930 & 15 & 680 & 14 \\ \hline Kitchen–Bathroom & 790 & 13 & 876 & 13 & 975 & 18 \\ \hline Bathroom–Bedroom & 640 & 9 & 545 & 8 & 420 & 9 \\ \hline Bathroom–Hall & 705 & 12 & 1153 & 19 & 885 & 17 \\ \hline Livingroom–Bedroom & 1055 & 16 & 934 & 14 & 430 & 9 \\ \hline Livingroom–Bathroom & 750 & 11 & 708 & 12 & 530 & 11 \\ \hline Livingroom–Hall & 767 & 11 & 1073 & 17 & 1140 & 22 \\ \hline Bedroom–Hall & 1062 & 17 & 1254 & 22 & 1150 & 22 \\ \hline Childroom–Livingroom & 900 & 14 & 1133 & 16 & 580 & 12 \\ \hline Childroom–Bathroom & 450 & 7 & 732 & 11 & 400 & 8 \\ \hline Childroom–Bedroom & 790 & 13 & 693 & 11 & 430 & 9 \\ \hline Childroom–Kitchen & 1007 & 16 & 1183 & 18 & 1040 & 20 \\ \hline Childroom–Hall & 935 & 15 & 1482 & 24 & 1030 & 20 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Approximate distances (in cm) and estimated step counts between room pairs for each dataset. Distances were measured as accurately as possible, using a measuring tape, considering pathway curvatures. Step counts were estimated based on a sample walking path between rooms. Figure 6: Speed distribution across three datasets. The boxplots illustrate variations in walking speed and transition characteristics among the different home environments. In Figure 7, both the BSSID names received from the ESP32 microcontroller for each target room and the signal strengths corresponding to these BSSIDs were recorded for certain periods of time, and the target room was added to the dataset as a label. In addition to the Wi-Fi signal strengths, a mobile application was developed to calculate the transition time of the user from one room (source room) to another room (target room) and, as a result, Wi-Fi signal strengths, source room, time difference, and target room information were used to classify the target room. In the online phase, the raw Wi-Fi dataset and the Wi-Fi-Room-to-Room Transition Time datasets obtained in the offline phase were divided into training and test sets by 10-fold cross-validation. Then, various supervised ML algorithms were used to train the dataset, and the prediction models obtained from the training phase were used to predict the target room information, using the BSSID signals and transition times in the test set. Then, the effect of the transition time between rooms on the classification performance was analyzed. This dataset of labeled locations was used in the test phase to model the relationship between fingerprints and location, in order to estimate the location of an unknown fingerprint. In this study, 34 supervised learning algorithms were implemented, including Classification Trees (Fine Tree, Coarse Tree, Medium Tree), Discriminant Analysis (Quadratic, Linear), Naive Bayes, Nearest Neighbors (Fine, Medium, Cosine, Weighted), Support Vector Machine (Linear, Quadratic, Cubic, Medium Gaussian, Coarse Gaussian), Classification Ensembles, and Neural Networks (Narrow, RusBoosted, Bilayered, Trilyaered). To determine which algorithms to retain for further analysis, the highest-performing algorithm within each model category (e.g., SVM, k-NN, Decision Trees) was selected.