Skip to content

Commit

Permalink
tutorial +a #132
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartleby2718 committed Dec 21, 2018
1 parent df8d770 commit fdea4fb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Keras-Preprocessing==1.0.5
keyboard==0.13.2
kiwisolver==1.0.1
Markdown==3.0.1
matplotlib==3.0.2
numpy==1.15.4
protobuf==3.6.1
pyparsing==2.3.0
Expand Down
35 changes: 35 additions & 0 deletions visualization.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import matplotlib.pyplot as plt
import numpy as np
import os

current_directory = os.path.dirname(os.path.realpath(__file__))
csv_file_path = os.path.join(current_directory, 'sample.csv')
data = np.genfromtxt(csv_file_path, delimiter=',',
names=['epoch', 'loss', 'episode', 'result', 'reason',
'duel', 'time', 'color'])

# TODO: epoch vs loss (logarithmic y-axis)
plt.plot(data['epoch'], data['loss'], color='r', label='sample')
plt.ticklabel_format(style='sci', axis='loss', scilimits=(0, 0))
plt.xlabel('epoch')
plt.ylabel('loss')
plt.title('epoch vs loss')
plt.legend()
plt.show()

# TODO: epoch vs time
plt.plot(data['epoch'], data['time'], color='r', label='sample')
plt.xlabel('epoch')
plt.ylabel('time')
plt.title('epoch vs time')
plt.legend()
plt.show()

# TODO: epoch vs episode
# TODO: epoch vs duel
# TODO: loss vs result
# TODO: loss vs reason
# TODO: loss vs duel
# TODO: loss vs color
# TODO: duel vs time
# TODO: epoch vs winning percentage

0 comments on commit fdea4fb

Please sign in to comment.