code: Double checking

This commit is contained in:
Manos Katsomallos 2022-02-16 02:45:24 +01:00
parent b765a8b069
commit 253a629c1b

View File

@ -29,7 +29,7 @@ def main(args):
lmdks_pct = [0, 20, 40, 60, 80, 100] lmdks_pct = [0, 20, 40, 60, 80, 100]
# The privacy budget # The privacy budget
epsilon = 1.0 epsilon = 1.0
eps_pct = [.201, .51, .725, .95] eps_pct = [.25, .5, .75, 1]
markers = [ markers = [
'^', '^',
@ -65,10 +65,10 @@ def main(args):
for _ in range(args.iter): 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 # 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 mae[i] += (lmdk_bgt.mae_cont(rls_data)/args.iter)*100
# Calculate once # Calculate once
@ -109,10 +109,10 @@ def main(args):
path = str('../../rslt/lmdk_sel_eps/' + d) path = str('../../rslt/lmdk_sel_eps/' + d)
# Plot legend # Plot legend
lmdk_lib.plot_legend() lmdk_lib.plot_legend()
# # Show plot # Show plot
# plt.show() plt.show()
# Save plot # Save plot
lmdk_lib.save_plot(path + '-sel-eps.pdf') # lmdk_lib.save_plot(path + '-sel-eps.pdf')
print('[OK]', flush=True) print('[OK]', flush=True)