# Bloom Filter Approach for Autonomous Data Acquisition in the Edge-Based MCS Scenario +
## 4 Results and Discussion
### Evaluation of BF Parameters  
As already stated in this section, referring to [9], we further evaluate a BF structure for the MCS domain with a different input dataset. In contrast to our previous work, where we have used just a tiny dataset containing 200,605 sensor readings (in total), hereafter, we use a dataset that is 23 times larger to thoroughly evaluate the applicability of BF structure in the MCS scenario containing realistic data traces. In Section 3.2, we have already shown that an optimal BF size and the number of hash functions can be calculated from the number of inserted elements \(n\) and the probability of false positives \(p\). Therefore, in this part of the evaluation, we observe the behavior of a BF structure when encoding MCS data concerning those two parameters. Our goal is to identify distinct data readings which need to be inserted in a BF during its validity period (i.e., a period prior to filter reset), where a _distinct_ reading is defined as a unique combination of parameter name and a _small_ MGRS area identifier in the observed time slot. In other words, two data readings are redundant if they are collected in the same time slot (e.g., 5 min period), inside the same MGRS area of 100 \(\times\) 100 m\({}^{2}\) (i.e., _small_ MGRS area) and associated with the same parameter (e.g., \(CO\)), and only one of them should be inserted in a BF structure during that period. A BF is reset upon the end of each time slot (e.g., 5 min period), meaning that a new empty BF structure, which will be used in the next time slot, is initialized. As we can assume the expected number of data readings that need to be inserted in the filter (i.e., \(n\)), and we can set the desired probability of false positives \(p\) for an MCS service, in all experiments, a filter structure is initialized with an optimal number of bits \(m\) and hash functions \(k\) calculated from Equations (4) and (5). Note that in our previous work described in [9], we have used just one filter for the evaluation purpose, meaning that all data readings have been inserted in the same BF structure, while in the remainder of this section, we use multiple BFs, one for each active \(km\) MGRS area following the proposed algorithm as described in Section 3.3. In addition, to give a reader true insight into the error rate caused by using the BF structure for encoding MCS data, it is not realistic to insert all of the 4.7 million data readings that have been placed in a single day (as previously described) in just one filter structure. First, we investigate the impact of parameter \(n\) on the number of distinct data readings that were lost because the BF membership test failed and concluded that a reading (i.e., the combination of observed parameter and _small_ MGRS area identifier) is already inserted in the structure (although it was not) when a predefined probability of false positives \(p\) is in the range from 0.1% to 10%. In the experiment, we use just a subset of data collected in the afternoon during a 3 h period between 4 p.m. and 7 p.m., as shown in Figure 4, and reset each BF structure every 10 min (i.e., a BF validity period is 10 min). Each yellow bar in the graph shows the total number of data readings in the observed time slot (e.g., there are 30,227 readings in the time slot from 4:30 p.m. to 4:40 p.m.), while the orange segment in the bar represents the total number of distinct data readings that must be inserted in BFs during this period. In general, overall users have gathered between 30 and 42 thousand data readings in each time slot, but a relatively small proportion of them are indeed valuable and should not be lost during the BF encoding process (i.e., between 4.4 and 7.2 thousand data readings are unique in each time slot, while other data readings are redundant and can be discarded). Figure 5 demonstrates how the parameter \(n\) affects the number of distinct (useful) data readings lost in each observed time slot.