# Bloom Filter Approach for Autonomous Data Acquisition in the Edge-Based MCS Scenario +
## 4 Results and Discussion
### Evaluation of BF Parameters
In particular, the number of lost elements is represented by blue, green, dark blue, and violet segments in the bar when the probability of false positives \(p\) was 0.1%, 1%, 5%, and 10%, respectively. As expected, when we compare the number of lost readings for different values of \(p\), we can see that the lowest error is attained in every observed time slot when the probability of false positives \(p\) is 0.001 (i.e., 0.1%). Furthermore, when we compare Figure 5a,b, we can see that a larger value of the expected number of different elements \(n\) will considerably minimize data loss, even when \(p\) is 0.1, as a Bloom filter will be initialized with a greater number of bits and hash functions. For example, when \(p\) is 0.1, and \(n\) is raised from 50 to 100, the number of lost data readings drops from 79 (out of 6976) to 22 in a period between 6:20 p.m. and 6:30 a.m., while for \(p=0.001\) it drops from 2 to 0 for the same time slot. In addition, as shown in Figure 5b, there are no lost elements in the entire observed period when \(p=0.001\) and \(n=100\); however, for \(n=50\), the total number of lost elements is 18, as shown in Figure 5a. In general, we can conclude that if we initialize BFs with a higher \(n\) and lower \(p\), we will obtain greater precision (i.e., higher accuracy) because the vector will employ more bits and hash functions for mapping elements (i.e., data readings). Then, we investigate how the duration of the filter reset period impacts the number of data readings lost because the BF membership test failed. More precisely, we analyze the total number of distinct elements (i.e., readings) that were lost throughout 24 h, depicted as an error rate (in per mille, %o) in Figure 6, with regards to the BF validity period (i.e., each BF is periodically initialized at the beginning of every time slot throughout a day). It is critical to minimize this error as each of these lost elements is valuable and does not have a replacement in the observed time slot. As expected, we can see that the error rate is generally lower with a shorter window as the BF structure is more frequently reset. When we analyze the worst-case scenario, i.e., we expect to insert only 50 elements in the BF and the probability of false positives is 0.1 (i.e., 10%), around 1.1% of distinct data readings are lost throughout the day when the window duration is 1 min (see Figure 6a), while the error rate is round 7.6% when we reset BF every 15 min (see Figure 6b), and finally it goes up to 17% when BF reset period is every 60 min (see Figure 6d). In other words, although we allow having 10% of false positives, the actual error rate is significantly below this border because it goes from just 0.1% for a 1 min BF validity period up to 1.7% in the worst-case scenario when the BF validity period is 60 min. On the other hand, when we also expect to insert only 50 elements in the BF, but the allowed probability of false positives is a hundred times lower (i.e., 1%o), the actual error rate is less than 0.5% even when the window duration period is 60 min. Note that we expect to encode only 50 elements in each BF, but the actual number of inserted data readings is significantly higher in each time slot, and we are still below this very low allowed error rate, even when filters are reset every 60 min. As the BF validity period depends on the type of MCS service, our goal is to find parameters \(n\) and \(p\) that will keep the number of lost data readings to a minimum, regardless of the filter validity period duration. For example, noise levels need to be measured more densely than air pollutants, meaning that noise pollution monitoring will require a more frequent BF reset.