## 3 Intelligent Contact Tracing Based on Transmission Characteristics
### Space-Based Indoor Wi-Fi Contact Tracing
#### 3.2.2 Step 2: Determine the Close Contact with Machine Learning  
The space-based indoor Wi-Fi contact tracing determines the exposed (close contact) case based on the time duration of co-location in the same space after detecting whether the potential contact and confirmed patient were in the same space. We propose the application of a machine learning model for this task due to its ability to discern complex patterns and relationships within the data.  
First, the system determines whether the confirmed patient and potential contact person were co-located in the same space. When it is identified that an individual has been in the presence of a confirmed COVID-19 patient at a specific moment (\(t\)), it is classified as a casual contact (\(C_{t}=1\)).  
We employed \(I_{threshold}\) as an adjustment factor to address the inherent uncertainties present in our dataset. Subsequently, if it is determined that the total number of casual contacts exceeds the threshold value for indoor (\(I_{threshold}\)) during the period \(t_{min\text{\emph{ExposurePeriod}}}\), which indicates a potential risk of infection, the system designates it as a close contact event between the two individuals. This value was determined through an iterative experimental process, where we systematically fine-tuned it to align with observed trends and patterns in the data. Machine learning models were trained and used for the prediction of co-location in the same space based on the three similarity features. For training the machine learning models, we used BLE-based co-location data obtained through the BLE beacons installed  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Euclidean Similarity** & **Cosine Similarity** & **Jaccard Similarity** \\  & \((Sim(\vec{d}_{u},\vec{d}_{v})^{EUC})\) & \((Sim(\vec{d}_{u},\vec{d}_{v})^{COS})\) & \((Sim(\vec{d}_{u},\vec{d}_{v})^{IACC})\) \\ \hline \multirow{3}{*}{Description} & The similarity that measures & The similarity between vectors obtained using the cosine angle in an & The similarity between sets of data to see which members are shared and distinct \\  & the Euclidean distance & & cosine angle in an & data to see which members are shared and distinct \\  & between vectors & N-dimensional space & & shared Wi-Fi APs \\ \hline \multirow{2}{*}{Target feature} & The Wi-Fi fingerprint & The direction of movement & Shared Wi-Fi APs \\  & \(1-\frac{||\vec{d}_{v}-\vec{d}_{v}||}{2d_{max}}\) & \(\frac{\vec{d}_{v}-\vec{d}_{v}}{||\vec{d}_{v}||||\vec{d}_{v}||}\) & \(\frac{|A_{v}\cap A_{v}|}{|A_{v}\cup A_{v}|}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Similarities utilized for space-based indoor Wi-Fi contact tracing.  
in each indoor space as the ground truth. The feature data \(X\) are set as a three-dimensional feature vector that includes \(Sim(\vec{d}_{u},\vec{d}_{v})^{EUC}\), \(Sim(\vec{d}_{u},\vec{d}_{v})^{COS}\), and \(Sim(\vec{d}_{u},\vec{d}_{v})^{IACC}\). The data label \(Y\) (0 or 1) indicates whether or not they are co-located in the same space, 0 denotes non-contact, and 1 denotes casual contact (co-location). The casual contact status is determined by machine learning models trained using similarity features and BLE data.  
As the contact prediction models, we use the decision tree (DT), support vector machine (SVM), k-nearest neighbor (kNN), and artificial neural network (ANN) models, which are widely utilized as prediction models. To obtain accurate labels, the machine learning model was executed with datasets obtained through the pre-arranged scenario. Figure 2 shows how the space-based indoor Wi-Fi contact tracing method detects close contact. As a time window of \(C_{t}\) with a size of \(t_{min ExposurePeriod}\) slides within \(t_{infectious}\), if the sum of \(C_{t}\) during \(t_{min ExposurePeriod}\) exceeds the threshold (\(I_{threshold}\)), it is determined as an exposed case (close contact).