evaluation: Re-executed some experiments
This commit is contained in:
parent
f84cfb205d
commit
f48dca02aa
@ -68,29 +68,30 @@ def main(args):
|
|||||||
|
|
||||||
for _ in range(args.iter):
|
for _ in range(args.iter):
|
||||||
|
|
||||||
lmdks, eps_out = lmdk_sel.find_lmdks(seq, lmdks, epsilon)
|
lmdks_sel, eps_out = lmdk_sel.find_lmdks(seq, lmdks, epsilon)
|
||||||
|
|
||||||
# Skip
|
# Skip
|
||||||
rls_data_s, bgts_s = lmdk_bgt.skip_cont(seq, lmdks, eps_out)
|
rls_data_s, bgts_s = lmdk_bgt.skip_cont(seq, lmdks_sel, eps_out)
|
||||||
# lmdk_bgt.validate_bgts(seq, lmdks, epsilon, bgts_s)
|
# lmdk_bgt.validate_bgts(seq, lmdks, epsilon, bgts_s)
|
||||||
mae_s[i] += (lmdk_bgt.mae_cont(rls_data_s)/args.iter)*100
|
mae_s[i] += (lmdk_bgt.mae_cont(rls_data_s)/args.iter)*100
|
||||||
|
|
||||||
# Uniform
|
# Uniform
|
||||||
rls_data_u, bgts_u = lmdk_bgt.uniform_cont(seq, lmdks, eps_out)
|
rls_data_u, bgts_u = lmdk_bgt.uniform_cont(seq, lmdks_sel, eps_out)
|
||||||
# lmdk_bgt.validate_bgts(seq, lmdks, epsilon, bgts_u)
|
# lmdk_bgt.validate_bgts(seq, lmdks, epsilon, bgts_u)
|
||||||
mae_u[i] += (lmdk_bgt.mae_cont(rls_data_u)/args.iter)*100
|
mae_u[i] += (lmdk_bgt.mae_cont(rls_data_u)/args.iter)*100
|
||||||
|
|
||||||
# Adaptive
|
# Adaptive
|
||||||
rls_data_a, _, _ = lmdk_bgt.adaptive_cont(seq, lmdks, eps_out, .5, .5)
|
rls_data_a, _, _ = lmdk_bgt.adaptive_cont(seq, lmdks_sel, eps_out, .5, .5)
|
||||||
mae_a[i] += (lmdk_bgt.mae_cont(rls_data_a)/args.iter)*100
|
mae_a[i] += (lmdk_bgt.mae_cont(rls_data_a)/args.iter)*100
|
||||||
|
|
||||||
# Calculate once
|
# Calculate once
|
||||||
if i == 0:
|
if pct == lmdks_pct[0]:
|
||||||
# Event
|
# Event
|
||||||
rls_data_evt, _ = lmdk_bgt.uniform_cont(seq, lmdk_lib.find_lmdks_cont(lmdk_data, seq, uid, 0), epsilon)
|
rls_data_evt, _ = lmdk_bgt.uniform_cont(seq, lmdks, epsilon)
|
||||||
mae_evt += (lmdk_bgt.mae_cont(rls_data_evt)/args.iter)*100
|
mae_evt += (lmdk_bgt.mae_cont(rls_data_evt)/args.iter)*100
|
||||||
|
elif pct == lmdks_pct[-1]:
|
||||||
# User
|
# User
|
||||||
rls_data_usr, _ = lmdk_bgt.uniform_cont(seq, lmdk_lib.find_lmdks_cont(lmdk_data, seq, uid, 100), epsilon)
|
rls_data_usr, _ = lmdk_bgt.uniform_cont(seq, lmdks, epsilon)
|
||||||
mae_usr += (lmdk_bgt.mae_cont(rls_data_usr)/args.iter)*100
|
mae_usr += (lmdk_bgt.mae_cont(rls_data_usr)/args.iter)*100
|
||||||
|
|
||||||
plt.axhline(
|
plt.axhline(
|
||||||
|
@ -80,12 +80,13 @@ def main(args):
|
|||||||
mae_a[i] += (lmdk_bgt.mae_cont(rls_data_a)/args.iter)*100
|
mae_a[i] += (lmdk_bgt.mae_cont(rls_data_a)/args.iter)*100
|
||||||
|
|
||||||
# Calculate once
|
# Calculate once
|
||||||
if i == 0:
|
if pct == lmdks_pct[0]:
|
||||||
# Event
|
# Event
|
||||||
rls_data_evt, _ = lmdk_bgt.uniform_cont(seq, lmdk_lib.find_lmdks_cont(lmdk_data, seq, uid, 0), epsilon)
|
rls_data_evt, _ = lmdk_bgt.uniform_cont(seq, lmdks, epsilon)
|
||||||
mae_evt += (lmdk_bgt.mae_cont(rls_data_evt)/args.iter)*100
|
mae_evt += (lmdk_bgt.mae_cont(rls_data_evt)/args.iter)*100
|
||||||
|
elif pct == lmdks_pct[-1]:
|
||||||
# User
|
# User
|
||||||
rls_data_usr, _ = lmdk_bgt.uniform_cont(seq, lmdk_lib.find_lmdks_cont(lmdk_data, seq, uid, 100), epsilon)
|
rls_data_usr, _ = lmdk_bgt.uniform_cont(seq, lmdks, epsilon)
|
||||||
mae_usr += (lmdk_bgt.mae_cont(rls_data_usr)/args.iter)*100
|
mae_usr += (lmdk_bgt.mae_cont(rls_data_usr)/args.iter)*100
|
||||||
|
|
||||||
plt.axhline(
|
plt.axhline(
|
||||||
|
@ -48,7 +48,7 @@ def main(args):
|
|||||||
# The y axis
|
# The y axis
|
||||||
plt.ylabel('Mean absolute error (kWh)') # Set y axis label.
|
plt.ylabel('Mean absolute error (kWh)') # Set y axis label.
|
||||||
plt.yscale('log')
|
plt.yscale('log')
|
||||||
plt.ylim(.1, 10000)
|
plt.ylim(.1, 100000)
|
||||||
# Bar offset
|
# Bar offset
|
||||||
x_offset = -(bar_width/2)*(n - 1)
|
x_offset = -(bar_width/2)*(n - 1)
|
||||||
|
|
||||||
@ -80,13 +80,13 @@ def main(args):
|
|||||||
mae_a[i] += lmdk_bgt.mae_cons(seq, rls_data_a)/args.iter
|
mae_a[i] += lmdk_bgt.mae_cons(seq, rls_data_a)/args.iter
|
||||||
|
|
||||||
# Calculate once
|
# Calculate once
|
||||||
|
if pct == lmdks_pct[0]:
|
||||||
# Event
|
# Event
|
||||||
if i == 0:
|
rls_data_evt, _ = lmdk_bgt.uniform_cons(seq, lmdks, epsilon)
|
||||||
rls_data_evt, _ = lmdk_bgt.uniform_cons(seq, seq[seq[:, 1] < lmdks_th[0]], epsilon)
|
|
||||||
mae_evt += lmdk_bgt.mae_cons(seq, rls_data_evt)/args.iter
|
mae_evt += lmdk_bgt.mae_cons(seq, rls_data_evt)/args.iter
|
||||||
|
elif pct == lmdks_pct[-1]:
|
||||||
# User
|
# User
|
||||||
if i == 0:
|
rls_data_usr, _ = lmdk_bgt.uniform_cons(seq, lmdks, epsilon)
|
||||||
rls_data_usr, _ = lmdk_bgt.uniform_cons(seq, seq[seq[:, 1] < lmdks_th[len(lmdks_th)-1]], epsilon)
|
|
||||||
mae_usr += lmdk_bgt.mae_cons(seq, rls_data_usr)/args.iter
|
mae_usr += lmdk_bgt.mae_cons(seq, rls_data_usr)/args.iter
|
||||||
|
|
||||||
plt.axhline(
|
plt.axhline(
|
||||||
|
@ -46,7 +46,7 @@ def main(args):
|
|||||||
# The y axis
|
# The y axis
|
||||||
plt.ylabel('Mean absolute error (kWh)') # Set y axis label.
|
plt.ylabel('Mean absolute error (kWh)') # Set y axis label.
|
||||||
plt.yscale('log')
|
plt.yscale('log')
|
||||||
plt.ylim(.1, 10000)
|
plt.ylim(.1, 100000)
|
||||||
# Bar offset
|
# Bar offset
|
||||||
x_offset = -(bar_width/2)*(n - 1)
|
x_offset = -(bar_width/2)*(n - 1)
|
||||||
|
|
||||||
@ -75,13 +75,13 @@ def main(args):
|
|||||||
mae_a[i] += lmdk_bgt.mae_cons(seq, rls_data_a)/args.iter
|
mae_a[i] += lmdk_bgt.mae_cons(seq, rls_data_a)/args.iter
|
||||||
|
|
||||||
# Calculate once
|
# Calculate once
|
||||||
|
if pct == lmdks_pct[0]:
|
||||||
# Event
|
# Event
|
||||||
if i == 0:
|
rls_data_evt, _ = lmdk_bgt.uniform_cons(seq, lmdks, epsilon)
|
||||||
rls_data_evt, _ = lmdk_bgt.uniform_cons(seq, seq[seq[:, 1] < lmdks_th[0]], epsilon)
|
|
||||||
mae_evt += lmdk_bgt.mae_cons(seq, rls_data_evt)/args.iter
|
mae_evt += lmdk_bgt.mae_cons(seq, rls_data_evt)/args.iter
|
||||||
|
elif pct == lmdks_pct[-1]:
|
||||||
# User
|
# User
|
||||||
if i == 0:
|
rls_data_usr, _ = lmdk_bgt.uniform_cons(seq, lmdks, epsilon)
|
||||||
rls_data_usr, _ = lmdk_bgt.uniform_cons(seq, seq[seq[:, 1] < lmdks_th[len(lmdks_th)-1]], epsilon)
|
|
||||||
mae_usr += lmdk_bgt.mae_cons(seq, rls_data_usr)/args.iter
|
mae_usr += lmdk_bgt.mae_cons(seq, rls_data_usr)/args.iter
|
||||||
|
|
||||||
plt.axhline(
|
plt.axhline(
|
||||||
|
@ -70,7 +70,7 @@ def main(args):
|
|||||||
# The y axis
|
# The y axis
|
||||||
plt.ylabel('Mean absolute error (m)') # Set y axis label.
|
plt.ylabel('Mean absolute error (m)') # Set y axis label.
|
||||||
plt.yscale('log')
|
plt.yscale('log')
|
||||||
# plt.ylim(1, 100000000)
|
plt.ylim(1, 1000000)
|
||||||
# Bar offset
|
# Bar offset
|
||||||
x_offset = -(bar_width/2)*(n - 1)
|
x_offset = -(bar_width/2)*(n - 1)
|
||||||
|
|
||||||
@ -101,12 +101,13 @@ def main(args):
|
|||||||
rls_data_a, _, _ = lmdk_bgt.adaptive(seq, lmdks, eps_out, .5, .5)
|
rls_data_a, _, _ = lmdk_bgt.adaptive(seq, lmdks, eps_out, .5, .5)
|
||||||
mae_a[i] += lmdk_bgt.mae(seq, rls_data_a)/args.iter
|
mae_a[i] += lmdk_bgt.mae(seq, rls_data_a)/args.iter
|
||||||
|
|
||||||
|
# Calculate once
|
||||||
|
if lmdk == min(data_info[d]['lmdks']):
|
||||||
# Event
|
# Event
|
||||||
if lmdk == 0:
|
|
||||||
rls_data_evt, _ = lmdk_bgt.uniform_r(seq, lmdks, bgt['epsilon'])
|
rls_data_evt, _ = lmdk_bgt.uniform_r(seq, lmdks, bgt['epsilon'])
|
||||||
mae_evt += lmdk_bgt.mae(seq, rls_data_evt)/args.iter
|
mae_evt += lmdk_bgt.mae(seq, rls_data_evt)/args.iter
|
||||||
|
elif lmdk == max(data_info[d]['lmdks']):
|
||||||
# User
|
# User
|
||||||
if lmdk == 100:
|
|
||||||
rls_data_usr, _ = lmdk_bgt.uniform_r(seq, lmdks, bgt['epsilon'])
|
rls_data_usr, _ = lmdk_bgt.uniform_r(seq, lmdks, bgt['epsilon'])
|
||||||
mae_usr += lmdk_bgt.mae(seq, rls_data_usr)/args.iter
|
mae_usr += lmdk_bgt.mae(seq, rls_data_usr)/args.iter
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ def main(args):
|
|||||||
# The y axis
|
# The y axis
|
||||||
plt.ylabel('Mean absolute error (m)') # Set y axis label.
|
plt.ylabel('Mean absolute error (m)') # Set y axis label.
|
||||||
plt.yscale('log')
|
plt.yscale('log')
|
||||||
# plt.ylim(1, 100000000)
|
plt.ylim(1, 1000000)
|
||||||
# Bar offset
|
# Bar offset
|
||||||
x_offset = -(bar_width/2)*(n - 1)
|
x_offset = -(bar_width/2)*(n - 1)
|
||||||
|
|
||||||
@ -103,12 +103,13 @@ def main(args):
|
|||||||
# mae_d[i] += lmdk_bgt.mae(seq, rls_data_a)/args.iter
|
# mae_d[i] += lmdk_bgt.mae(seq, rls_data_a)/args.iter
|
||||||
# s_d += s_d_c/args.iter
|
# s_d += s_d_c/args.iter
|
||||||
|
|
||||||
|
# Calculate once
|
||||||
|
if lmdk == min(data_info[d]['lmdks']):
|
||||||
# Event
|
# Event
|
||||||
if lmdk == 0:
|
|
||||||
rls_data_evt, _ = lmdk_bgt.uniform_r(seq, lmdks, bgt['epsilon'])
|
rls_data_evt, _ = lmdk_bgt.uniform_r(seq, lmdks, bgt['epsilon'])
|
||||||
mae_evt += lmdk_bgt.mae(seq, rls_data_evt)/args.iter
|
mae_evt += lmdk_bgt.mae(seq, rls_data_evt)/args.iter
|
||||||
|
elif lmdk == max(data_info[d]['lmdks']):
|
||||||
# User
|
# User
|
||||||
if lmdk == 100:
|
|
||||||
rls_data_usr, _ = lmdk_bgt.uniform_r(seq, lmdks, bgt['epsilon'])
|
rls_data_usr, _ = lmdk_bgt.uniform_r(seq, lmdks, bgt['epsilon'])
|
||||||
mae_usr += lmdk_bgt.mae(seq, rls_data_usr)/args.iter
|
mae_usr += lmdk_bgt.mae(seq, rls_data_usr)/args.iter
|
||||||
|
|
||||||
|
@ -558,10 +558,10 @@ def skip_cont(seq, lmdks, epsilon):
|
|||||||
# Add noise
|
# Add noise
|
||||||
o = lmdk_lib.randomized_response(is_landmark, bgts[i])
|
o = lmdk_lib.randomized_response(is_landmark, bgts[i])
|
||||||
if is_landmark:
|
if is_landmark:
|
||||||
|
bgts[i] = 0
|
||||||
if i > 0:
|
if i > 0:
|
||||||
# Approximate with previous
|
# Approximate with previous
|
||||||
o = rls_data[i - 1][1]
|
o = rls_data[i - 1][1]
|
||||||
bgts[i] = 0
|
|
||||||
rls_data[i] = [is_landmark, o]
|
rls_data[i] = [is_landmark, o]
|
||||||
return rls_data, bgts
|
return rls_data, bgts
|
||||||
|
|
||||||
|
Binary file not shown.
BIN
graphics/evaluation/hue-sel.pdf
Normal file
BIN
graphics/evaluation/hue-sel.pdf
Normal file
Binary file not shown.
Binary file not shown.
BIN
graphics/evaluation/lmdk-sel-dist-emd.pdf
Normal file
BIN
graphics/evaluation/lmdk-sel-dist-emd.pdf
Normal file
Binary file not shown.
BIN
graphics/evaluation/lmdk-sel-dist-norm.pdf
Normal file
BIN
graphics/evaluation/lmdk-sel-dist-norm.pdf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user