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()
评论列表
文章目录