code: Real data fixes
This commit is contained in:
parent
8787499bdf
commit
835022109f
@ -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,
|
||||
|
@ -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']):
|
||||
|
Loading…
Reference in New Issue
Block a user