code: Double checking
This commit is contained in:
parent
b765a8b069
commit
253a629c1b
@ -29,7 +29,7 @@ def main(args):
|
||||
lmdks_pct = [0, 20, 40, 60, 80, 100]
|
||||
# The privacy budget
|
||||
epsilon = 1.0
|
||||
eps_pct = [.201, .51, .725, .95]
|
||||
eps_pct = [.25, .5, .75, 1]
|
||||
|
||||
markers = [
|
||||
'^',
|
||||
@ -65,10 +65,10 @@ def main(args):
|
||||
|
||||
for _ in range(args.iter):
|
||||
|
||||
lmdks_sel = lmdk_sel.find_lmdks_eps(seq, lmdks, epsilon*e/100)
|
||||
lmdks_sel = lmdk_sel.find_lmdks_eps(seq, lmdks, epsilon*e)
|
||||
|
||||
# Uniform
|
||||
rls_data, _ = lmdk_bgt.uniform_cont(seq, lmdks_sel, epsilon*(1 - e/100))
|
||||
rls_data, _ = lmdk_bgt.uniform_cont(seq, lmdks_sel, epsilon*(1 - e))
|
||||
mae[i] += (lmdk_bgt.mae_cont(rls_data)/args.iter)*100
|
||||
|
||||
# Calculate once
|
||||
@ -109,10 +109,10 @@ def main(args):
|
||||
path = str('../../rslt/lmdk_sel_eps/' + d)
|
||||
# Plot legend
|
||||
lmdk_lib.plot_legend()
|
||||
# # Show plot
|
||||
# plt.show()
|
||||
# Show plot
|
||||
plt.show()
|
||||
# Save plot
|
||||
lmdk_lib.save_plot(path + '-sel-eps.pdf')
|
||||
# lmdk_lib.save_plot(path + '-sel-eps.pdf')
|
||||
print('[OK]', flush=True)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user