def show_agent_model_error_plot(self): for a in range(self.agent_model_error_list.shape[0]): agent_name = self.agents[a].name for r in range(self.agent_model_error_list.shape[1]): utils.draw_plot(range(len(self.model_error_samples[a, r])), self.agent_model_error_list[a, r], xlabel='num_samples', ylabel='agent_model_error', show=True, label=agent_name, title='run_number ' + str(r + 1))
def show_num_steps_plot(self): if False: for a in range(self.num_steps_run_list.shape[0]): agent_name = self.agents[a].name for r in range(self.num_steps_run_list.shape[1]): utils.draw_plot(range(len(self.num_steps_run_list[a, r])), self.num_steps_run_list[a, r], xlabel='episode_num', ylabel='num_steps', show=True, label=agent_name, title='run_number ' + str(r + 1)) if False: for r in range(self.num_steps_run_list.shape[1]): for a in range(self.num_steps_run_list.shape[0]): agent_name = self.agents[a].name utils.draw_plot(range(len(self.num_steps_run_list[a, r])), self.num_steps_run_list[a, r], xlabel='episode_num', ylabel='num_steps', show=False, label=agent_name, title='run_number ' + str(r + 1)) plt.show() if False: color = ['blue', 'orange', 'green'] for a in range(self.num_steps_run_list.shape[0]): agent_name = self.agents[a].name average_num_steps_run = np.mean(self.num_steps_run_list[a], axis=0) std_err_num_steps_run = np.std(self.num_steps_run_list[a], axis=0) AUC = sum(average_num_steps_run) print("AUC:", AUC, agent_name) utils.draw_plot(range(len(average_num_steps_run)), average_num_steps_run, std_error=std_err_num_steps_run, xlabel='episode_num', ylabel='num_steps', show=False, label=agent_name + str(a), title='average over runs', sub_plot_num='4' + '1' + str(a + 1), color=color[a]) utils.draw_plot(range(len(average_num_steps_run)), average_num_steps_run, std_error=std_err_num_steps_run, xlabel='episode_num', ylabel='num_steps', show=False, label=agent_name + str(a), title='average over runs', sub_plot_num=414) # plt.savefig('') plt.show()