diff --git a/code/lib/lmdk_bgt.py b/code/lib/lmdk_bgt.py index e86e814..b51465e 100644 --- a/code/lib/lmdk_bgt.py +++ b/code/lib/lmdk_bgt.py @@ -545,6 +545,18 @@ def uniform_r(seq, lmdks, epsilon): return rls_data, bgts +def uniform_cont(seq, lmdks, epsilon): + # Released + rls_data = [None]*len(seq) + # Budgets + bgts = uniform(seq, lmdks, epsilon) + for i, p in enumerate(seq): + r = p[2] in lmdks + # [original, perturbed] + rls_data[i] = [r, lmdk_lib.randomized_response(r, bgts[i])] + return rls_data, bgts + + def utility_analysis(seq, lmdks, o, epsilon): ''' Analyze the utility.