result_plotter.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:tensorforce-benchmark 作者: reinforceio 项目源码 文件源码
def plot_reward_by_timestep(self, ax=None):
        self.make_palette()

        full_data = pd.DataFrame()
        for idx, (benchmark_data, name) in enumerate(self.benchmarks):
            plot_data = to_timeseries(benchmark_data, x_label="Time step", y_label="Average Episode Reward",
                                    target=rewards_by_timestep, cut_x=benchmark_data.min_x('timesteps'), smooth=10)
            plot_data['Benchmark'] = name
            full_data = full_data.append(plot_data)

        plot = sns.tsplot(data=full_data, time="Time step", value="Average Episode Reward", unit="experiment",
                          condition='Benchmark', ax=ax, ci=[68, 95], color=self.palette)

        return plot
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号