Commit 5e3a6c60 authored by Samarth Joshi's avatar Samarth Joshi

Taking mean of all regrets instead of sum(max_regret - regret(i))

parent ab9db2ae
q5/instance1.png

55.4 KB | W: | H:

q5/instance1.png

65.3 KB | W: | H:

q5/instance1.png
q5/instance1.png
q5/instance1.png
q5/instance1.png
  • 2-up
  • Swipe
  • Onion skin
q5/instance2.png

58.6 KB | W: | H:

q5/instance2.png

69.3 KB | W: | H:

q5/instance2.png
q5/instance2.png
q5/instance2.png
q5/instance2.png
  • 2-up
  • Swipe
  • Onion skin
q5/instance3.png

57 KB | W: | H:

q5/instance3.png

71.7 KB | W: | H:

q5/instance3.png
q5/instance3.png
q5/instance3.png
q5/instance3.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -26,7 +26,7 @@ count=1
for instance_id, grp1 in df.groupby(['instance']):
#if instance_id == 'instance-1':
if True:
plt.figure(count)
plt.figure(count, figsize=(8, 6))
count = count + 1
for algorithm, grp2 in grp1.groupby(['algorithm', 'epsilon']):
rlist = []
......@@ -36,9 +36,10 @@ for instance_id, grp1 in df.groupby(['instance']):
algo_label = algo_label + " " + str(algorithm[1])
for horizon, grp3 in grp2.groupby(['horizon']):
hlist.append(horizon)
maxr = grp3['regret'].max()
rlist.append(grp3['regret'].apply(lambda x: maxr - x).sum())
plt.plot(hlist, rlist, label=algo_label)
#maxr = grp3['regret'].max()
#rlist.append(grp3['regret'].apply(lambda x: maxr - x).sum())
rlist.append(grp3['regret'].mean())
plt.plot(hlist, rlist, label=algo_label, marker=".")
plt.xscale("log")
plt.yscale("log")
plt.legend()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment