From a51dad866ec047a5b47a75833b6e248ccc600a6a Mon Sep 17 00:00:00 2001 From: Manos Katsomallos Date: Fri, 1 Oct 2021 21:57:14 +0200 Subject: [PATCH] copenhagen: Minor corrections --- code/expt/copenhagen.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/code/expt/copenhagen.py b/code/expt/copenhagen.py index 544591a..adb7610 100644 --- a/code/expt/copenhagen.py +++ b/code/expt/copenhagen.py @@ -45,12 +45,12 @@ def main(args): lmdk_lib.plot_init() # The x axis 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) # 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.ylim(0, 1.4) + plt.ylim(0, 100) # Bar offset 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) 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( y = mae_evt, color = '#212121', 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( y = mae_usr, color = '#616161', 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( x_i + x_offset,