Commit 5943baa1 authored by Tomáš Kažimír's avatar Tomáš Kažimír
Browse files

added sarsa doc

parent dd3e3e12
import matplotlib.pyplot as plt
import csv
import math
with open('zaznamy/result.csv','r') as csvfile:
reader = csv.reader(csvfile, delimiter=';')
train_episodes = []
train_time = []
test_mean = []
test_var = []
train_mean = []
train_var = []
for i, row in enumerate(reader):
if i > 2:
train_episodes.append(int(row[1]))
train_time.append(int(float(row[2])))
test_mean.append(float(row[5]))
test_var.append(float(row[6]))
train_mean.append(float(row[3]))
train_var.append(float(row[4]))
train_std = [math.sqrt(num) for num in train_var]
plt.figure()
plt.ylabel("training episodes")
......@@ -29,15 +32,15 @@ with open('zaznamy/result.csv','r') as csvfile:
plt.savefig("grafy/train_time.png")
plt.figure()
plt.ylabel("test reward mean")
plt.ylabel("train reward mean")
plt.xlabel("model")
plt.plot([i for i in range(len(test_mean))], test_mean)
plt.ylim(ymin=0, ymax=260)
plt.savefig("grafy/test_mean.png")
plt.plot([i for i in range(len(train_mean))], train_mean)
plt.ylim(ymin=0, ymax=100)
plt.savefig("grafy/train_mean.png")
plt.figure()
plt.ylabel("test reward variance")
plt.ylabel("train reward std")
plt.xlabel("model")
plt.plot([i for i in range(len(test_var))], test_var)
plt.ylim(ymin=0, ymax=13000)
plt.savefig("grafy/test_var.png")
\ No newline at end of file
plt.plot([i for i in range(len(train_std))], train_std)
plt.ylim(ymin=0, ymax=200)
plt.savefig("grafy/train_std.png")
\ No newline at end of file
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