From f3f0e40aa4706bee4e8d09a1d6cf94725673c0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Thu, 8 Mar 2018 17:51:32 +0100 Subject: [PATCH] small fixes --- main.py | 2 +- plot.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index eea36ed..80afcdc 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,7 @@ def print_train_outcome(outcome, init_ep = 0): print("train;{init_ep};{count};{sum};{mean}".format(**format_vars)) def print_eval_outcomes(outcomes, init_ep = 0): - for outcome in eval_outcomes: + for outcome in outcomes: scores = outcome[1] format_vars = { 'init_ep': init_ep, 'method': outcome[0], diff --git a/plot.py b/plot.py index f0eefbb..f40f06e 100644 --- a/plot.py +++ b/plot.py @@ -6,7 +6,7 @@ import matplotlib.pyplot as plt import matplotlib.ticker as mtick import matplotlib.dates as mdates from matplotlib.backends.backend_pdf import PdfPages -headers = ['Phase', 'Method', 'Total episodes', 'Episodes', 'Sum', 'Mean'] +headers = ['Phase', 'Method', 'Start episodes', 'Episodes', 'Sum', 'Mean'] fig, ax = plt.subplots(1, 1) @@ -24,11 +24,13 @@ plt.show() while True: #df = pd.read_csv(sys.stdin, sep=";", names=headers) df = pd.read_csv('log', sep=";", names=headers) + df['Total episodes'] = df['Start episodes'] + 100 + print(df) + x = df['Total episodes'] y = df['Mean'] plt.scatter(x, y, c=[[1,0.5,0]]) - print("draw") #fig.canvas.draw() plt.pause(2)