# A REM Update Methodology Based on Clustering and Random Forest
## 4 Evaluation
### REM Update Evaluation
First, at time \(\mathbf{t}_{1}\), the newly collected measurements were not enough to show the position of the AP; i.e., the upper left area was poorly predicted, leading to a high error. Next, at time \(\mathbf{t}_{2}\), the collected measurements at the center of the room provided some small insight into coverage of the room, but the obtained REM is not ideal when we compare it with Figure 5. Finally, at time \(\mathbf{t}_{3}\), the measurements collected in the area close to the AP make the RF model trained with those data overestimate the coverage of the room, leading to high error and an absence of shadow areas. Table 2 shows error evaluations for the 3 times when data were newly collected. In the four clusters, we can see that the error lessened as time passed because new clusters could be updated as new measurement data were collected. As presented in Figure 7, at time \(\mathbf{t}_{3}\), we could update the whole room, leading to a significant reduction in the error  
Figure 8: The baseline REM update mechanism without clustering. (**a**) The REM at time \(\mathbf{t}_{1}\); (**b**) The REM at time \(\mathbf{t}_{2}\); (**c**) The REM at time \(\mathbf{t}_{3}\). Figure 7: The proposed REM update mechanism considering four clusters. (**a**) The REM at time \(\mathbf{t}_{1}\); (**b**) The REM at time \(\mathbf{t}_{2}\); (**c**) The REM at time \(\mathbf{t}_{3}\). metrics. In the case of the baseline method without clustering, the error was not reduced as time passed, and the errors obtained at each time significantly depended on the area where the new data were collected. For instance, we observe that the baseline method without clustering obtained the lowest error at time \(\mathbf{t}_{2}\) for most of the compared methods because the data were collected in the middle of the room, which can provide a small insight into the coverage of the area of interest. The above-mentioned observation is consistent with the results shown in Figure 8 where, among the 3 time cases, the REM at time \(\mathbf{t}_{2}\) is the closest representation to the target REM illustrated in Figure 4:0  
Table 3 presents the computational time for the training and prediction phases of the historical dataset and the newly collected data using the proposed approach and the baseline methods. The computational time of the \(K\)-means algorithm to select the best centroids based on the historical dataset \(D_{H}\) (consisting of 1160 samples) is 0.097 s, and the computational time to predict the nearest cluster for the total number of samples is 0.013 s. The number of samples in the newly collected datasets at times \(\mathbf{t}_{1}\), \(\mathbf{t}_{2}\), and \(\mathbf{t}_{3}\) are 1800, 1800, and 2400, respectively. In Table 3, we observe that the computational time of the historical dataset is higher than the time when updating the model at time \(\mathbf{t}_{1}\) because the historical dataset is used to train all the ML models for each cluster, while the data at time \(\mathbf{t}_{1}\) are only used to update the ML model of the corresponding cluster. Moreover, we see that the computational time in the training phase increased as the number of samples increased because, in general, more samples mean more computations and larger memory requirements, leading to longer processing times. The higher computational time of the RF with four clusters compared to the RF without clustering is due to the need to split the samples into their respective clusters and the requirement of training four different instances of RF. In the grid prediction phase, the computational time corresponds to the time to split the samples of the grid into their respective clusters and the time to predict the total number of points in the grid with their respective ML algorithm.