Current Code is test on Python 3.10.14
pip install -r requirements.txt
If you want to run a single demo trial, you can run the following command.
bash demo.sh
demo.sh
will create a folder named log_data
and store its results in log_data/demo.json
. And it will also output the result on the terminal.
If you open log_data/demo.json
, you will get something like:
{
"random": <Total Error Rate>,
"inside": <False Negative Error Rate>,
"outside": <False Positive Error Rate>
}
You can run the following code to run the trials on different m, na, and k.
bash scripts/run_eps_diff_m.sh
bash scripts/run_eps_diff_na.sh
bash scripts/run_eps_diff_k.sh
The results will be store under the following folders, respectively.
log_data/eps_diff_m/*.json
log_data/eps_diff_na/*.json
log_data/eps_diff_k/*.json
Please refer to the instructions in notebooks/draw_figs.ipynb
.
If you just want run experiments, please ignore this section, and follow the instructions in Section 2 and 3.
-
bloom_filter_eps.py
contains the implementation of the DP Bloom Filter. -
get_N_by_delta.py
contains code for calculating$1 - \delta$ quntail$N$ according to the distribution of the random variable$W$ . More details about the distribution of$W$ can be found in our paper.