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)