bgt_cmp_hue: Minor corrections

This commit is contained in:
Manos Katsomallos 2021-10-01 06:48:50 +02:00
parent 008a6aa8a4
commit a137aa3741

View File

@ -41,7 +41,7 @@ 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 (kWh)') # Set y axis label.
@ -68,20 +68,18 @@ def main(args):
# Uniform
rls_data_u, bgts_u = lmdk_bgt.uniform_cons(seq, lmdks, epsilon)
# lmdk_bgt.validate_bgts(seq, lmdks, epsilon, bgts_u)
mae_u[i] += lmdk_bgt.mae_cons(seq, rls_data_u)/args.iter
# Adaptive
rls_data_a, _, _ = lmdk_bgt.adaptive_cons(seq, lmdks, epsilon, .5, .5)
mae_a[i] += lmdk_bgt.mae_cons(seq, rls_data_a)/args.iter
# Event
# Calculate once
# Event
if i == 0:
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
# User
# Calculate once
if i == 0:
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