# False Positive RFID Detection Using Classification Models
## 5 Results and Discussion
### Classification Model Performance  
Table 8 compares various model performances, including outlier detection impacts. The machine learning models, such as support vector machine (SVM), multilayer perceptron (MLP), Naive Bayes (NB), decision tree (DT), and random forest (RF) are utilized to detect false positive readings. The result showed that for conventional models, RF outperformed all other models in terms of precision, recall, F1 score, and accuracy (97.078%, 96.199% 96.623%, and 97.167%, respectively).  
Previous studies comparing machine learning algorithms to predict RFID using RSS showed that high classification accuracy could be achieved [21; 22], with SVM providing superior accuracy up to 95.5% [22]. However, the present study considered static tags as well as tags moving close to the gate tag as false positive readings, whereas previous studies only considered static tags. Therefore, this study is expected to better represent the complex real situation.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Actual Class** & **Predicted as “1”** & **Predicted as “0”** \\ \hline
1 & TP & FN \\
0 & FP & TN \\ \hline \hline \end{tabular}
\end{table}
Table 6: Classifier confusion matrix.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Metric** & **Formula** \\ \hline Precision & \(\frac{\text{TP}}{(\text{TP}+\text{FP})}\) \\ Recall & \(\frac{\text{TP}}{(\text{TP}+\text{FN})}\) \\ F-1 score & \(\frac{2\times(\text{Precision}\times\text{Recall})}{(\text{Precision}+\text{ Recall})}\) \\ Accuracy & \(\frac{(\text{TP}+\text{TN})}{(\text{TP}+\text{TN}+\text{FP}+\text{FN})}\) \\ \hline \hline \end{tabular}
\end{table}
Table 7: Classifier model performance metrics.  
We also investigated the effect of combining outlier detection (IQR or LOF) and the classification model on accuracy, as shown in Table 8 and Figure 7. The classification model accuracy increased when applying interquartile range (IQR) except for SVM, with the overall average increase = 0.28%; whereas applying local outlier factor (LOF) increased the accuracy for all models, with the overall average increase = 0.51%. Our result showed that by integrating either IQR or LOF with RF provided the same and highest accuracy for our dataset = 97.5%. Integrating outlier detection (IQR or LOF) with the classification model improved classification accuracy in our dataset. Previous studies also showed that by integrating IQR or LOF with the prediction model, it improved the accuracy [29, 33]. However, this presented model (RF with IQR or LOF) needs to be performed on different types of datasets, as it might not produce the highest accuracy compared to other models.  
The experimental results indicate that false positive RFID readings can be detected by machine learning with high accuracy. If tags that are static or moved close to the gate are incorrectly classified, the warehouse assumes the relevant products have been loaded. Therefore, incomplete products will be sent. In contrast, when tags moved through the gate are incorrectly classified as static or moved close to the gate, the warehouse will send excess product. Thus, combining outlier detection with suitable classification models will significantly improve the accuracy of WMS monitoring of delivered products to supply chain partners.  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Classifier Model** & **Recall** & **F-1 Score** & **Precision** & **Accuracy** \\ \hline NB & 89.578 & 89.308 & 89.054 & 90.887 \\ MLP & 94.934 & 95.373 & 95.845 & 96.121 \\ SVM & 90.69 & 90.69 & 90.69 & 92.118 \\ DT & 95.035 & 94.856 & 94.683 & 95.628 \\ RF & 96.199 & 96.623 & 97.078 & 97.167 \\ NB + IQR & 88.559 & 86.456 & 84.774 & 91.016 \\ MLP + IQR & 93.476 & 93.852 & 94.24 & 96.171 \\ SVM + IQR & 88.056 & 87.518 & 87.01 & 92.047 \\ DT + IQR & 93.179 & 94.448 & 95.864 & 96.613 \\ RF + IQR & 95.443 & 95.968 & 96.517 & 97.496 \\ NB + LOF & 90.661 & 90.106 & 89.606 & 91.677 \\ MLP + LOF & 94.923 & 95.463 & 96.051 & 96.28 \\ SVM + L