In [1]:
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
In [2]:
data = np.load('./dqn/save_data/gridWorld/one_go1/data.npz')
data_time = data['time']
data_error = data['error']
data_episode = data['episode']
data_error = data['error']
In [3]:
data_r = np.load('./dqn/save_data/gridWorld/one_go_random/data.npz')
data_r_time = data_r['time']
data_r_error = data_r['error']
data_r_episode = data_r['episode']
data_r_error = data_r['error']
In [4]:
plt.plot(data_episode,data_error)
plt.plot(data_r_episode,data_r_error)
plt.plot((7100,7100),(0,1),'green')
plt.plot((12300,12300),(0,1),'blue')
plt.xlabel('episode')
plt.ylabel('accuracy')
plt.legend(['algorithm', 'random'], loc='lower right')
plt.show()
In [5]:
plt.plot(data_episode,data_time)
plt.plot(data_r_episode,data_r_time)
plt.xlabel('episode')
plt.ylabel('time')
plt.legend(['algorithm', 'random'], loc='lower right')
plt.show()
In [6]:
data = np.load('./dqn/save_data/2048/1/data.npz')
# data_time = data['time']
data_error = data['error']
data_episode = data['episode']
print(data.keys())
In [7]:
plt.plot(data_episode, data_error)
# plt.plot(data_episode, data['ti'])
# plt.plot((7100,7100),(0,1),'green')
plt.xlabel('Episode')
plt.ylabel('Score')
# plt.legend(['random'], loc='lower right')
plt.show()