From 4f60ce183c376f46ab9c676a42e2001bc70e5382 Mon Sep 17 00:00:00 2001 From: Manos Katsomallos Date: Wed, 13 Oct 2021 17:24:02 +0200 Subject: [PATCH] code:Fixed some parametes --- code/expt/copenhagen-sel.py | 16 ++++++++-------- code/expt/hue-sel.py | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/code/expt/copenhagen-sel.py b/code/expt/copenhagen-sel.py index 516c395..6d92036 100644 --- a/code/expt/copenhagen-sel.py +++ b/code/expt/copenhagen-sel.py @@ -75,31 +75,31 @@ def main(args): # Skip rls_data_s, _ = lmdk_bgt.skip_cont(seq, lmdks, eps_out) - mae_s[i] += (lmdk_bgt.mae_cont(rls_data_s)/args.iter)*100 + mae_s[i] += mae_cont(rls_data_s)/args.iter rls_data_s_sel, _ = lmdk_bgt.skip_cont(seq, lmdks_sel, eps_out) - mae_s_sel[i] += (lmdk_bgt.mae_cont(rls_data_s_sel)/args.iter)*100 + mae_s_sel[i] += mae_cont(rls_data_s_sel)/args.iter # Uniform rls_data_u, _ = lmdk_bgt.uniform_cont(seq, lmdks, eps_out) - mae_u[i] += (lmdk_bgt.mae_cont(rls_data_u)/args.iter)*100 + mae_u[i] += mae_cont(rls_data_u)/args.iter rls_data_u_sel, _ = lmdk_bgt.uniform_cont(seq, lmdks_sel, eps_out) - mae_u_sel[i] += (lmdk_bgt.mae_cont(rls_data_u_sel)/args.iter)*100 + mae_u_sel[i] += mae_cont(rls_data_u_sel)/args.iter # Adaptive rls_data_a, _, _ = lmdk_bgt.adaptive_cont(seq, lmdks, eps_out, .5, .5) - mae_a[i] += (lmdk_bgt.mae_cont(rls_data_a)/args.iter)*100 + mae_a[i] += mae_cont(rls_data_a)/args.iter rls_data_a_sel, _, _ = lmdk_bgt.adaptive_cont(seq, lmdks_sel, eps_out, .5, .5) - mae_a_sel[i] += (lmdk_bgt.mae_cont(rls_data_a_sel)/args.iter)*100 + mae_a_sel[i] += mae_cont(rls_data_a_sel)/args.iter # Calculate once if pct == lmdks_pct[0]: # Event rls_data_evt, _ = lmdk_bgt.uniform_cont(seq, lmdks, epsilon) - mae_evt += (lmdk_bgt.mae_cont(rls_data_evt)/args.iter)*100 + mae_evt += mae_cont(rls_data_evt)/args.iter elif pct == lmdks_pct[-1]: # User rls_data_usr, _ = lmdk_bgt.uniform_cont(seq, lmdks, epsilon) - mae_usr += (lmdk_bgt.mae_cont(rls_data_usr)/args.iter)*100 + mae_usr += mae_cont(rls_data_usr)/args.iter plt.axhline( y = mae_evt, diff --git a/code/expt/hue-sel.py b/code/expt/hue-sel.py index 6e1ea7c..34eca25 100644 --- a/code/expt/hue-sel.py +++ b/code/expt/hue-sel.py @@ -70,21 +70,21 @@ def main(args): # Skip rls_data_s, _ = lmdk_bgt.skip_cons(seq, lmdks, eps_out) - mae_s[i] += (lmdk_bgt.mae_cons(seq, rls_data_s)/args.iter)*100 + mae_s[i] += (lmdk_bgt.mae_cons(seq, rls_data_s)/args.iter rls_data_s_sel, _ = lmdk_bgt.skip_cons(seq, lmdks_sel, eps_out) - mae_s_sel[i] += (lmdk_bgt.mae_cons(seq, rls_data_s_sel)/args.iter)*100 + mae_s_sel[i] += lmdk_bgt.mae_cons(seq, rls_data_s_sel)/args.iter # Uniform rls_data_u, _ = lmdk_bgt.uniform_cons(seq, lmdks, eps_out) - mae_u[i] += (lmdk_bgt.mae_cons(seq, rls_data_u)/args.iter)*100 + mae_u[i] += lmdk_bgt.mae_cons(seq, rls_data_u)/args.iter rls_data_u_sel, _ = lmdk_bgt.uniform_cons(seq, lmdks_sel, eps_out) - mae_u_sel[i] += (lmdk_bgt.mae_cons(seq, rls_data_u_sel)/args.iter)*100 + mae_u_sel[i] += lmdk_bgt.mae_cons(seq, rls_data_u_sel)/args.iter # Adaptive rls_data_a, _, _ = lmdk_bgt.adaptive_cons(seq, lmdks, eps_out, .5, .5) - mae_a[i] += (lmdk_bgt.mae_cons(seq, rls_data_a)/args.iter)*100 + mae_a[i] += lmdk_bgt.mae_cons(seq, rls_data_a)/args.iter rls_data_a_sel, _, _ = lmdk_bgt.adaptive_cons(seq, lmdks_sel, eps_out, .5, .5) - mae_a_sel[i] += (lmdk_bgt.mae_cons(seq, rls_data_a_sel)/args.iter)*100 + mae_a_sel[i] += lmdk_bgt.mae_cons(seq, rls_data_a_sel)/args.iter # Calculate once if pct == lmdks_pct[0]: