diff --git a/code/expt/copenhagen-sel.py b/code/expt/copenhagen-sel.py index 6d92036..516c395 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] += mae_cont(rls_data_s)/args.iter + mae_s[i] += (lmdk_bgt.mae_cont(rls_data_s)/args.iter)*100 rls_data_s_sel, _ = lmdk_bgt.skip_cont(seq, lmdks_sel, eps_out) - mae_s_sel[i] += mae_cont(rls_data_s_sel)/args.iter + mae_s_sel[i] += (lmdk_bgt.mae_cont(rls_data_s_sel)/args.iter)*100 # Uniform rls_data_u, _ = lmdk_bgt.uniform_cont(seq, lmdks, eps_out) - mae_u[i] += mae_cont(rls_data_u)/args.iter + mae_u[i] += (lmdk_bgt.mae_cont(rls_data_u)/args.iter)*100 rls_data_u_sel, _ = lmdk_bgt.uniform_cont(seq, lmdks_sel, eps_out) - mae_u_sel[i] += mae_cont(rls_data_u_sel)/args.iter + mae_u_sel[i] += (lmdk_bgt.mae_cont(rls_data_u_sel)/args.iter)*100 # Adaptive rls_data_a, _, _ = lmdk_bgt.adaptive_cont(seq, lmdks, eps_out, .5, .5) - mae_a[i] += mae_cont(rls_data_a)/args.iter + mae_a[i] += (lmdk_bgt.mae_cont(rls_data_a)/args.iter)*100 rls_data_a_sel, _, _ = lmdk_bgt.adaptive_cont(seq, lmdks_sel, eps_out, .5, .5) - mae_a_sel[i] += mae_cont(rls_data_a_sel)/args.iter + mae_a_sel[i] += (lmdk_bgt.mae_cont(rls_data_a_sel)/args.iter)*100 # Calculate once if pct == lmdks_pct[0]: # Event rls_data_evt, _ = lmdk_bgt.uniform_cont(seq, lmdks, epsilon) - mae_evt += mae_cont(rls_data_evt)/args.iter + mae_evt += (lmdk_bgt.mae_cont(rls_data_evt)/args.iter)*100 elif pct == lmdks_pct[-1]: # User rls_data_usr, _ = lmdk_bgt.uniform_cont(seq, lmdks, epsilon) - mae_usr += mae_cont(rls_data_usr)/args.iter + mae_usr += (lmdk_bgt.mae_cont(rls_data_usr)/args.iter)*100 plt.axhline( y = mae_evt, diff --git a/code/expt/t-drive-sel.py b/code/expt/t-drive-sel.py index 89e4561..862dbda 100644 --- a/code/expt/t-drive-sel.py +++ b/code/expt/t-drive-sel.py @@ -94,21 +94,21 @@ def main(args): # Skip rls_data_s, _ = lmdk_bgt.skip(seq, lmdks, eps_out) - mae_s[i] += (lmdk_bgt.mae(seq, rls_data_s)/args.iter)*100 + mae_s[i] += lmdk_bgt.mae(seq, rls_data_s)/args.iter rls_data_s_sel, _ = lmdk_bgt.skip(seq, lmdks_sel, eps_out) - mae_s_sel[i] += (lmdk_bgt.mae(seq, rls_data_s_sel)/args.iter)*100 + mae_s_sel[i] += lmdk_bgt.mae(seq, rls_data_s_sel)/args.iter # Uniform rls_data_u, _ = lmdk_bgt.uniform_r(seq, lmdks, eps_out) - mae_u[i] += (lmdk_bgt.mae(seq, rls_data_u)/args.iter)*100 + mae_u[i] += lmdk_bgt.mae(seq, rls_data_u)/args.iter rls_data_u_sel, _ = lmdk_bgt.uniform_r(seq, lmdks_sel, eps_out) - mae_u_sel[i] += (lmdk_bgt.mae(seq, rls_data_u_sel)/args.iter)*100 + mae_u_sel[i] += lmdk_bgt.mae(seq, rls_data_u_sel)/args.iter # Adaptive rls_data_a, _, _ = lmdk_bgt.adaptive(seq, lmdks, eps_out, .5, .5) - mae_a[i] += (lmdk_bgt.mae(seq, rls_data_a)/args.iter)*100 + mae_a[i] += lmdk_bgt.mae(seq, rls_data_a)/args.iter rls_data_a_sel, _, _ = lmdk_bgt.adaptive(seq, lmdks_sel, eps_out, .5, .5) - mae_a_sel[i] += (lmdk_bgt.mae(seq, rls_data_a_sel)/args.iter)*100 + mae_a_sel[i] += lmdk_bgt.mae(seq, rls_data_a_sel)/args.iter # Calculate once if lmdk == min(data_info[d]['lmdks']):