lmdk_bgt: Added uniform_cont
This commit is contained in:
parent
ecd7719616
commit
76a95f6a0a
@ -545,6 +545,18 @@ def uniform_r(seq, lmdks, epsilon):
|
|||||||
return rls_data, bgts
|
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):
|
def utility_analysis(seq, lmdks, o, epsilon):
|
||||||
'''
|
'''
|
||||||
Analyze the utility.
|
Analyze the utility.
|
||||||
|
Loading…
Reference in New Issue
Block a user