Hybrid_FSP.py 文件源码

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

项目:PyME 作者: vikramsunkara 项目源码 文件源码
def plot_checked(self):
        """
        plot_checked plots the expectations of the data check pointed.
        """
        import pylab as pl
        pl.ioff()

        if len(self._stored_t) != 0:
            pl.figure(2)
            pl.title(" Method %s"%(self.model_name))
            pl.xlabel("Time,t")
            pl.ylabel("Expectation")

            exp = []

            for i in range(len(self._stored_t)):
                exp.append(np.sum(np.multiply(self._stored_X[i],self._stored_w[i]),axis=1))

            EXP = np.array(exp).T


            for i in range(EXP.shape[0]):
                pl.plot(self._stored_t,EXP[i,:],'x-',label=self.model.species[i])

            pl.legend()

        # The probability plotter
        if len(self._probed_t) != 0:
            pl.figure(3)
            pl.title(" Method %s | Probing States over Time "%(self.model_name))
            pl.xlabel("Time, t")
            pl.ylabel("Marginal Probability")

            probs = np.array(self._probed_probs).T

            for i in range(probs.shape[0]):
                pl.plot(self._probed_t,probs[i,:],'x-',label=str(self._probed_states[0][self.stoc_vector,i]))
            pl.legend()
        pl.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号