## 5 Results and Discussion  
### Indoor Experimental Results  
* Similarity of Wi-Fi fingerprints  
Figure 6 shows some of the calculated results of the Euclidean, Cosine, and Jaccard similarities between two individuals. The irregularities observed in the Euclidean similarity during the first \(2\) h of the trace are influenced by the specifics of our experimental setup. The varying proximity of rooms A-C, some adjacent and others more distant, contributes to the diverse data patterns. The beacon data served as the ground truth for determining the casual contact. If one or more network addresses of the same beacon were shared between a confirmed patient and a potential contact person, it could be determined that they were co-located in the same space at the time (marked as the filled circle in Figure 6). The ground truth was set to true, indicating contact in this case, while without a shared network address of beacons, it was set to false, indicating non-contact (marked as the empty circle). As shown in Figure 6, the accuracy of the beacon signal-based ground truth is approximately \(70\%\), leaving about \(30\%\) of the data with inaccuracies. This discrepancy arises despite participants being physically present in the same space in the scenario. It is crucial to recognize and address these challenges in order to provide a comprehensive understanding of the experimental conditions. The accuracy of the beacon signal-based ground truth has an impact on the value of \(I_{threshold}\). * Machine learning-based co-location recognition  
For the refinement of training, we trained machine learning models that predict a contact status using the training dataset, which is obtained in a scenario where we know a certain route and have already set an exposure status. Our machine learning model was trained using the Wi-Fi similarity features and beacon data as the ground truth and returned the casual contact status as the output. We used a decision tree (DT), k-nearest neighbor (kNN with \(k=3\)), and support vector machine (SVM) learning models. Additionally, we utilized a shallow neural network model with three hidden layers. The number of hidden neurons for each hidden layer was \(30\), \(12\), and \(8\). For the implementation of these models, we utilized the scikit-learn toolkit, a widely used machine learning library in Python that provides a variety of tools for classification, regression, clustering, and more. We analyzed each model by comparing the co-location recognition performance of predicted contacts to validate whether the trained machine learning models correctly recognize the space  
Figure 6: The similarity of Wi-Fi fingerprints. and judge the casual contact through accurate co-location recognition. Precision, recall, accuracy, and the F1 score were used as performance metrics. The co-location recognition accuracy of each model is shown in Table 2.  
All of the trained machine learning models exhibited co-location recognition accuracy of at least 83%. For the space-based indoor Wi-Fi contact tracing methods, DT was selected for the detection of casual contacts because it exhibited the best performance. We set the threshold value (\(I_{threshold}\)) for determining close contact as 50% of the time window (\(t_{minExposurePeriod}\)), based on the accuracy of the beacon signal-based ground truth. For the machine learning model that predicts contact for the input similarity features, if the model predicts casual contacts for more than the \(I_{threshold}\) within the set time duration (\(t_{minExposurePeriod}\)), the case is determined as an exposure. We analyzed the performance of the space-based indoor Wi-Fi contact tracing method using the validation dataset obtained from the month-long experiment.