## 3 Methodology
### iForest Outlier Detection
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature Type** & **Attribute Name** & **Description** \\ \hline \multirow{8}{*}{RSS} & RSS\_Min & Minimum signal strength \\  & RSS\_Max & Maximum signal strength \\  & RSS\_Mean & The average signal strength \\  & RSS\_Std & Standard deviation signal strength \\  & RSS\_Med & The median signal strength \\  & RSS\_Diff & Difference between the highest and lowest signal strengths \\  & RSS\_Kurt & Indication of whether the RSS distribution is heavy- or light-tailed \\  & RSS\_Skew & Distribution asymmetry of signal strengths \\  & RSS\_Count & Total number of reads for the tag \\ \hline \multirow{8}{*}{Timestamp} & Time\_Min & Timeframe (seconds) of tag read at the first time. \\  & Time\_Max & Timeframe (seconds) of tag read at the last time. \\  & Time\_Mean & The average value for the timeframe (seconds) \\  & Time\_Std & Standard deviation value for the timeframe (seconds) \\  & Time\_Med & The median value for the timeframe (seconds) \\  & Time\_Diff & Total period (seconds) for a tag between the first and last read time \\  & Time\_Kurt & Indication of whether the timeframe distribution is heavy- or \\  & Time\_Skew & Distribution asymmetry of timeframe \\  & Time\_Count & Total number of seconds for the tag \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Attributes extracted from RSS and TimeStamp. (see Figure 4). In this study, SMOTE was applied to our training set during Stratified 10-Fold CV in order to balance the training set, so that could improve prediction accuracy. ### Random Forest

The RF (random forest) algorithm is a classification method that combines decision trees [34]. Previous research has shown that using a randomization approach, such as bagging or the random space method, can improve the performance of RF. This randomization is achieved by using bootstrapped sampling of the original data and randomly selecting a subset of features at each node to determine the best split. The process of generating each tree in an RF model is described in Algorithm 2. ```
Input : training dataset \(D\), ensemble size \(T\), subspace dimension \(d\) Output : majority votes from tree models for \(t=1\) to \(T\)do  Build a bootstrap sample \(D_{t}\) from \(D\)  Select \(d\) features randomly and reduce the dimensionality of \(D_{t}\) accordingly  Train a tree model \(M_{t}\) on \(D_{t}\)  Split on the best feature in \(d\)  Let \(M_{t}\) grow without pruning end
```

**Algorithm 2** Random forest

In the random forest method, individual decision trees are generated by randomly selecting a subset of features at each node to determine the split. The algorithm works as follows: given a training dataset (\(D\)), the number of trees (\(T\)) in the model, a subspace dimension (\(d\)), and the available features (\(F\)), then a bootstrapped sample (\(D_{t}\)) of the original dataset (\(D\)) is taken. This sample includes some records from the original dataset multiple times and excludes others. Then, a subset (\(d\)) of features is randomly selected from the bootstrapped sample (\(D_{t}\)) to use as candidates for the split at each node. The decision

Figure 4: Synthesized data generated by SMOTE. tree classifier is trained on the bootstrapped sample (\(D_{t}\)) and the selected features (\(d\)) and grown to their maximum size without pruning. This process is repeated for all the trees in the forest. During the classification phase, each tree votes, and the most popular class is chosen as the prediction result. Random forests (RFs) can address several issues that affect decision trees, such as avoiding overfitting and generating low variance. In this study, data from RFID tags that were identified by iForest as outliers were removed. The SMOTE method was then used to balance the training set.