small fixes
This commit is contained in:
parent
150036a6cb
commit
f3f0e40aa4
2
main.py
2
main.py
|
@ -9,7 +9,7 @@ def print_train_outcome(outcome, init_ep = 0):
|
||||||
print("train;{init_ep};{count};{sum};{mean}".format(**format_vars))
|
print("train;{init_ep};{count};{sum};{mean}".format(**format_vars))
|
||||||
|
|
||||||
def print_eval_outcomes(outcomes, init_ep = 0):
|
def print_eval_outcomes(outcomes, init_ep = 0):
|
||||||
for outcome in eval_outcomes:
|
for outcome in outcomes:
|
||||||
scores = outcome[1]
|
scores = outcome[1]
|
||||||
format_vars = { 'init_ep': init_ep,
|
format_vars = { 'init_ep': init_ep,
|
||||||
'method': outcome[0],
|
'method': outcome[0],
|
||||||
|
|
6
plot.py
6
plot.py
|
@ -6,7 +6,7 @@ import matplotlib.pyplot as plt
|
||||||
import matplotlib.ticker as mtick
|
import matplotlib.ticker as mtick
|
||||||
import matplotlib.dates as mdates
|
import matplotlib.dates as mdates
|
||||||
from matplotlib.backends.backend_pdf import PdfPages
|
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)
|
fig, ax = plt.subplots(1, 1)
|
||||||
|
|
||||||
|
@ -24,11 +24,13 @@ plt.show()
|
||||||
while True:
|
while True:
|
||||||
#df = pd.read_csv(sys.stdin, sep=";", names=headers)
|
#df = pd.read_csv(sys.stdin, sep=";", names=headers)
|
||||||
df = pd.read_csv('log', sep=";", names=headers)
|
df = pd.read_csv('log', sep=";", names=headers)
|
||||||
|
df['Total episodes'] = df['Start episodes'] + 100
|
||||||
|
|
||||||
|
print(df)
|
||||||
|
|
||||||
x = df['Total episodes']
|
x = df['Total episodes']
|
||||||
y = df['Mean']
|
y = df['Mean']
|
||||||
|
|
||||||
plt.scatter(x, y, c=[[1,0.5,0]])
|
plt.scatter(x, y, c=[[1,0.5,0]])
|
||||||
print("draw")
|
|
||||||
#fig.canvas.draw()
|
#fig.canvas.draw()
|
||||||
plt.pause(2)
|
plt.pause(2)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user