example_sample_robertson_nopysb_with_dream.py 文件源码

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

项目:PyDREAM 作者: LoLab-VU 项目源码 文件源码
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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号