diff --git a/code/lib/lmdk_bgt.py b/code/lib/lmdk_bgt.py index f1cae78..5fe6ba7 100644 --- a/code/lib/lmdk_bgt.py +++ b/code/lib/lmdk_bgt.py @@ -370,7 +370,7 @@ def adaptive_cont(seq, lmdks, epsilon, inc_rt, dec_rt): skipped = 0 for i, p in enumerate(seq): # Check if current point is a landmark - r = p[2] in lmdks + r = any((lmdks[:]==p).all(1)) if r: lmdk_cur += 1 if lmdk_lib.should_sample(samp_rt) or i == 0: @@ -447,7 +447,7 @@ def skip_cont(seq, lmdks, epsilon): rls_data = [None]*len(seq) for i, p in enumerate(seq): # Check if current point is a landmark - r = p[2] in lmdks + r = any((lmdks[:]==p).all(1)) # Add noise o = lmdk_lib.randomized_response(r, bgts[i]) if r: @@ -636,7 +636,7 @@ def uniform_cont(seq, lmdks, epsilon): # Budgets bgts = uniform(seq, lmdks, epsilon) for i, p in enumerate(seq): - r = p[2] in lmdks + r = any((lmdks[:]==p).all(1)) # [original, perturbed] rls_data[i] = [r, lmdk_lib.randomized_response(r, bgts[i])] return rls_data, bgts