# Low-Cost Active Anomaly Detection with Switching Latency
## 4 Numerical Results
### Discussion  
In this section, we presented numerical results to illustrate the performance of the proposed DMSC policy as compared to the R-SPRT policy, whose switching times are the smallest among any policies, and the CL-\(\tau cN\) policy which has been proven in [22] to be asymptotically optimal in terms of minimizing the cumulative observation costs. We compared these three algorithms in Scenario 1 and Scenario 2, respectively. In Scenario 1 where \(s=o(B)\) as \(\alpha\to 0\). First, we considered the scenario where \(s\) is fixed. As shown in Figure 2b, the DMSC policy outperforms the other policies, and the performance of the R-SPRT policy is worse than that of the DMSC policy but better than that of CL-\(\tau cN\) policy. As for the DMSC policy, it outperforms other policies and approaches 0 as threshold \(B\) increase, which is consistent with the conclusion of Theorem 1 that the DMSC policy is asymptotically optimal as \(\alpha\to 0\). As for the R-SPRT policy, the decision-maker performs SPRT for each process in a random order, and can not switch to another process before the state of the current probed process is declared. Thus, the expected switching time of R-SPRT is fixed and smaller than any other policies. However, due to the switching constraints, the decision-maker should probe one process until the stopping rule of the process is reached, which leads to that the expected observation time and the cumulative observation costs of the R-SPRT policy are larger than others. In this scenario, the ratio of the single-switching delay to the single-observation delay is fixed, which means the single-switching cost is comparable with the single-observation cost. When the threshold \(B\) is small, the expected sample size required to declare the state of a process is small, and the negative effects of the switching constraints of the R-SPRT policy are not much significant. At this time, the relative cost of the R-SPRT policy is slightly larger than that of the DMSC policy. As the threshold \(B\) increases, the expected sample size increases, and the cumulative observation costs of the R-SPRT policy increase faster than others. As a result, as the threshold \(B\) increases, the relative cost of R-SPRT increases, and the gap of the relative costs of R-SPRT policy and DMSC policy increases. As for the CL-\(\tau cN\) policy policy, at each given time \(n\), the decision-maker calculate the index \(\gamma_{m}(n)=\frac{\pi_{m}(n)c_{m}}{E^{(n)}(N_{m})}\) for each process \(m\). At each non-specific time, the process with the largest index is probed, while at each specific time that grows exponentially sparse with time, the processes are probed in a round-robin fashion, which leads to the increment of the switching time and the cumulative switching costs. Thus, in this scenario where the single-switching delay is comparable with the single-observation delay (\(s=2\)), the relative cost of CL-\(\tau cN\) policy is highest among these compared policies, even if the CL-\(\tau cN\) policy is proved to be asymptotically optimal in terms of minimizing the cumulative observation costs [22]. Then, we considered the scenario where \(s/(B\alpha)\) is fixed. It should be noted that \(\alpha B\approx-\alpha\log\alpha\to 0\) holds as \(\alpha\to 0\). In this simulation, \(s/(\alpha B)\) is fixed and \(s/B=2\alpha\), which leads to that \(\lim_{\alpha\to 0}s=2\alpha B\to 0\) holds. In another word, the ratio of the single-switching delay to the single-observation delay approaches 0, and the objective of minimizing the cumulative costs can be simplified to minimizing the cumulative observation costs. Thus, due to the switching constraints which leads to that the decision-maker spends a lot of time probing each process, the R-SPRT policy performs worst in this scenario. On the contrary, benefiting from the small impact of the switches on the cumulative costs, the CL-\(\tau cN\) policy performs better than that of the last simulation.