copenhagen: Minor corrections

This commit is contained in:
Manos Katsomallos 2021-10-01 21:57:14 +02:00
parent 0fc18a1ddd
commit a51dad866e

View File

@ -45,12 +45,12 @@ def main(args):
lmdk_lib.plot_init() lmdk_lib.plot_init()
# The x axis # The x axis
plt.xticks(x_i, np.array(lmdks_pct, int)) plt.xticks(x_i, np.array(lmdks_pct, int))
plt.xlabel('Landmarks percentage') # Set x axis label. plt.xlabel('Landmarks (%)') # Set x axis label.
plt.xlim(x_i.min() - x_margin, x_i.max() + x_margin) plt.xlim(x_i.min() - x_margin, x_i.max() + x_margin)
# The y axis # The y axis
plt.ylabel('Mean absolute error') # Set y axis label. plt.ylabel('Mean absolute error (%)') # Set y axis label.
# plt.yscale('log') # plt.yscale('log')
# plt.ylim(0, 1.4) plt.ylim(0, 100)
# Bar offset # Bar offset
x_offset = -(bar_width/2)*(n - 1) x_offset = -(bar_width/2)*(n - 1)
@ -88,19 +88,25 @@ def main(args):
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, lmdk_lib.find_lmdks_cont(lmdk_data, seq, uid, 100), epsilon)
mae_usr += lmdk_bgt.mae_cont(rls_data_usr)/args.iter mae_usr += lmdk_bgt.mae_cont(rls_data_usr)/args.iter
mae_u *= 100
mae_s *= 100
mae_a *= 100
mae_evt *= 100
mae_usr *= 100
plt.axhline( plt.axhline(
y = mae_evt, y = mae_evt,
color = '#212121', color = '#212121',
linewidth=lmdk_lib.line_width linewidth=lmdk_lib.line_width
) )
plt.text(x_i[-1] + x_i[-1]*.14, mae_evt - mae_evt*.14, 'event') plt.text(x_i[-1] + x_i[-1]*.14, mae_evt - mae_evt*.05, 'event')
plt.axhline( plt.axhline(
y = mae_usr, y = mae_usr,
color = '#616161', color = '#616161',
linewidth=lmdk_lib.line_width linewidth=lmdk_lib.line_width
) )
plt.text(x_i[-1] + x_i[-1]*.14, mae_usr - mae_usr*.14, 'user') plt.text(x_i[-1] + x_i[-1]*.14, mae_usr - mae_usr*.05, 'user')
plt.bar( plt.bar(
x_i + x_offset, x_i + x_offset,