def likelihood(parameter_vector):
parameter_vector = 10**np.array(parameter_vector)
#Solve ODE system given parameter vector
yout = odeint(odefunc, y0, tspan, args=(parameter_vector,))
cout = yout[:, 2]
#Calculate log probability contribution given simulated experimental values.
logp_ctotal = np.sum(like_ctot.logpdf(cout))
#If simulation failed due to integrator errors, return a log probability of -inf.
if np.isnan(logp_ctotal):
logp_ctotal = -np.inf
return logp_ctotal
# Add vector of rate parameters to be sampled as unobserved random variables in DREAM with uniform priors.
example_sample_robertson_nopysb_with_dream.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录