diff --git a/code/lib/lmdk_sel.py b/code/lib/lmdk_sel.py index 421ab7e..46e250c 100644 --- a/code/lib/lmdk_sel.py +++ b/code/lib/lmdk_sel.py @@ -299,6 +299,19 @@ def get_non_opts_from_bottom(seq, lmdks): def find_lmdks(seq, lmdks, epsilon): + ''' + Add dummy landmarks to original landmarks. + + Parameters: + seq - All of the data points. + lmdks - The original landmarks. + epsilon - The available privacy budget. + + Returns: + lmdks_new - The new landmarks. + The remaining privacy budget. + ''' + # The privacy budget to use eps_sel = 0 if len(lmdks) > 0 and len(seq) != len(lmdks): # Get landmarks timestamps in sequence @@ -310,10 +323,10 @@ def find_lmdks(seq, lmdks, epsilon): # Landmarks selection budget eps_sel = epsilon/(len(lmdks_seq) + 1) # Get private landmarks timestamps - lmdks_seq, _ = exp_mech.exponential_pareto(hist, opts, exp_mech.score, 1.0, eps_sel) + lmdks_seq, _ = exp_mech.exponential(hist, opts, exp_mech.score, 1.0, eps_sel) # Get actual landmarks values - lmdks = seq[lmdks_seq] - return lmdks, epsilon - eps_sel + lmdks_new = seq[lmdks_seq] + return lmdks_new, epsilon - eps_sel def test(): # Start and end points of the sequence diff --git a/rslt/bgt_cmp/Copenhagen-sel.pdf b/rslt/bgt_cmp/Copenhagen-sel-pareto.pdf similarity index 100% rename from rslt/bgt_cmp/Copenhagen-sel.pdf rename to rslt/bgt_cmp/Copenhagen-sel-pareto.pdf diff --git a/rslt/bgt_cmp/HUE-sel.pdf b/rslt/bgt_cmp/HUE-sel-pareto.pdf similarity index 100% rename from rslt/bgt_cmp/HUE-sel.pdf rename to rslt/bgt_cmp/HUE-sel-pareto.pdf diff --git a/rslt/bgt_cmp/T-drive-sel.pdf b/rslt/bgt_cmp/T-drive-sel-pareto.pdf similarity index 100% rename from rslt/bgt_cmp/T-drive-sel.pdf rename to rslt/bgt_cmp/T-drive-sel-pareto.pdf