# A REM Update Methodology Based on Clustering and Random Forest
## 4 Evaluation
### REM Update Evaluation  
In this subsection, we present the performance of the proposed scheme for REM updates. In particular, we considered a practical scenario where obstacles are added around the AP, which degrades coverage of the area of interest. Figure 5 shows the REM obtained by using RF in the ideal case where we can collect data measurements of the whole room after adding the obstacles. The data collected for this ideal case were used \begin{table}
\begin{tabular}{l c c c c} \hline \hline  & \multicolumn{3}{c}{**MAPE**} \\ \hline
**Model for Prediction** & **4 Clusters** & **3 Clusters** & **2 Clusters** & **1 Cluster** \\ \hline RF & 1.511\% & 1.513\% & 1.507\% & 1.515\% \\ SVR & 3.565\% & 3.718\% & 3.828\% & 4.504\% \\ MLP & 4.325\% & 4.174\% & 4.254\% & 4.835\% \\ AdaBoost & 3.001\% & 3.178\% & 3.603\% & 4.064\% \\ \hline \hline  & \multicolumn{3}{c}{**RMSE**} \\ \hline
**Model for Prediction** & **4 Clusters** & **3 Clusters** & **2 Clusters** & **1 Cluster** \\ \hline RF & 1.295 & 1.290 & 1.290 & 1.285 \\ SVR & 2.418 & 2.486 & 2.537 & 2.793 \\ MLP & 2.648 & 2.556 & 2.602 & 2.977 \\ AdaBoost & 1.810 & 1.912 & 2.150 & 2.409 \\ \hline \hline  & \multicolumn{3}{c}{**R2 Score**} \\ \hline
**Model for Prediction** & **4 Clusters** & **3 Clusters** & **2 Clusters** & **1 Cluster** \\ \hline RF & 0.948 & 0.949 & 0.949 & 0.949 \\ SVR & 0.819 & 0.809 & 0.801 & 0.760 \\ MLP & 0.783 & 0.799 & 0.791 & 0.727 \\ AdaBoost & 0.899 & 0.887 & 0.857 & 0.821 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Error evaluation of the dataset \(D_{H}\). Figure 4: REM for the initial measurements by considering four clusters. (**a**) RF; (**b**) SVR; (**c**) AdaBoost. as testing data to analyze the error in the proposed scheme compared with the baseline method. By comparing Figures 4a and 5, we can see that adding obstacles around the AP degraded the coverage, particularly in the quality of the received signal in the bottom area of the room, compared with no obstacles. Next, we analyzed a scenario where newly collected data were obtained only from a partial area of the room, which is a realistic assumption since it is not always possible to measure the whole area of interest each time. We considered three sets of newly collected data (at times \(\mathbf{t}_{1}\), \(\mathbf{t}_{2}\), and \(\mathbf{t}_{3}\)). It was assumed that during \(\mathbf{t}_{1}\), \(\mathbf{t}_{2}\), and \(\mathbf{t}_{3}\), coverage by the Wi-Fi signal was stable in the whole room. Figure 6 shows the newly collected measurements at the three different times. Figure 7 illustrates the proposed REM update mechanism for the three sets of newly collected data that followed the scheme in Figure 2. In detail, data collected at time \(\mathbf{t}_{1}\) were used to train the RF model only for the corresponding clusters, while the remaining clusters used the previous RF model. We observe in Figure 7a that only the right area of the room was updated to the new scenario, which can be confirmed from Figure 5. On the other hand, the left part of the room was still predicted as having the historical measurements. Figure 5: Target REM after changing the physical environment of the room by using RF. Figure 6: The three areas considered for newly collected measurements. (a) Data collected at time \(\mathbf{t}_{1}\); (b) Data collected at time \(\mathbf{t}_{2}\); (c) Data collected at time \(\mathbf{t}_{3}\). The reason is that, at time \(\mathbf{t}_{1}\), there were no data available to update the left part of the REM. Next, at time \(\mathbf{t}_{2}\), we could update the bottom area of the room while the upper left area was still not updated due to the lack of measurements in that area. Finally, at time \(\mathbf{t}_{3}\), we updated the upper left area, leading to a complete update of the whole room, compared with Figure 5.  
Figure 8 shows a baseline REM update mechanism without clustering for the 3 newly collected datasets. In this baseline scheme, the newly collected data were used to train an RF model for the whole room without using clustering.