active_inference_basic.py 文件源码

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

项目:actinf 作者: x75 项目源码 文件源码
def rh_system_plot(self):
        """prepare and plot system outputs over input variations from sweep"""
        assert hasattr(self, "X_system_sweep")
        assert hasattr(self, "Y_system_sweep")

        print "%s.rh_plot_system sweepsteps = %d" % (self.__class__.__name__, self.X_system_sweep.shape[0])
        print "%s.rh_plot_system environment = %s" % (self.__class__.__name__, self.environment)
        print "%s.rh_plot_system environment proprio dims = %d" % (self.__class__.__name__, self.environment.conf.m_ndims)

        scatter_data_raw   = np.hstack((self.X_system_sweep, self.Y_system_sweep))
        scatter_data_cols  = ["X%d" % i for i in range(self.X_system_sweep.shape[1])]
        scatter_data_cols += ["Y%d" % i for i in range(self.Y_system_sweep.shape[1])]
        print "scatter_data_raw", scatter_data_raw.shape
        # df = pd.DataFrame(scatter_data_raw, columns=["x_%d" % i for i in range(scatter_data_raw.shape[1])])
        df = pd.DataFrame(scatter_data_raw, columns=scatter_data_cols)

        title = "%s: i/o behvaiour for %s, in = X, out = Y" % (self.mode, self.environment_str,)

        # plot_scattermatrix(df)
        plot_scattermatrix_reduced(df, title = title)

    ################################################################################
    # model sweep hooks


    # map a model
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号