## 3 Methodology
### iForest Outlier Detection
We used dataset from [17] for the current study, which considered more complex scenarios (tag movement and direction) as compared to dataset from [10; 11; 13], where they considered tag movement only. Dataset used in [10; 11; 13] considered two classes (binary), they are moving and static tag, while in [17] and our study considered five classes (multiclass) such as going inside and out of the gate, moving close to the gate, turning around, and static tags. Multi-class classification is more complex than binary classification, as the result our prediction model generated lower accuracy than the models for binary classification in [10; 11; 13]. However, for same dataset our model generated higher classification accuracy compared to previous study in [17]. In addition, the number of reader and antennas used in experiment could influence the model performance as presented in [38]. However, in our study to detect the direction of the tags at least required single reader with two antennas. The first antenna could be installed outside and the other inside the warehouse gate. The purpose of our study was to try to minimize amount of hardware without reducing the system performance. ### Practical Application

The goal of this study is to create a web-based system that uses a machine learning model to accurately track tagged products and assist management in decision-making. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Author** & **Purpose** & **Architecture** & **Feature** & **Method** & **Accuracy (\%)** & **Practical Application** \\ \hline \multirow{3}{*}{[10]} & Detecting & One reader & Statistical features & & \\  & movement & 4 antennas & from RSS and timestamps & Information Gain & 95.69 & Not reported \\  & & & Statistical Features & & \\  & Detecting & Two readers & from RSS and phase & SVM & 95.3 & Not reported \\  & & & readings & & & \\  & Detecting & One reader, & Statistical Features & RF with IQR & \\  & movement & one antenna & from RSS & outlier detection & 97.496 & Yes \\  & Detecting & & Statistical Features & & \\  & movement and & two antennas & from RSS and & XGBoost & 93.5 & Yes \\  & & & Timestamp & & \\  & Detecting & & Statistical Features & RF with iForest & \\  & movement and & two antennas & from RSS and & Outlier Detection & 94.251 & Yes \\  & direction & & Timestamp & and SMOTE & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of our study with previous work. Previous research has shown that this type of system can be useful in web-based traceability [13; 17] and disease prediction [39; 40]. By employing a prediction model based on machine learning, RFID tags crossing the gate and static or other types of tags movement can be detected accurately. The web-based monitoring system was built using the PHP programming language and a MySQL database on the server side, Java for the capturing application, and Python for the tag movement and direction module on the client side (Client PC). The prediction model was implemented using the Flask web framework and Scikit-learn library on the client side and was used to filter out noise (false positive RFID tags) and detect the direction of the RFID tags as they moved through the gate. Figure 6 illustrates how the tag products moved by forklift through the RFID gate and the sensor data was sent to the Client PC where the prediction model was employed. The system received sensor data from an RFID reader and used the last six seconds of data as input to extract statistical features, which were then sent to an API based on Flask. The trained model was used to predict the direction of the tagged product, whether it was moving in or moving out, and the result was presented to management through a web-based interface. Figure 7 showed the interface displayed a history of the tagged products, allowing management to monitor their location in the warehouse in real time. Figure 6: Framework design of web-based monitoring system. Figure 7: The history of RFID sensor data presented in a web-based system.