在PyMC2中,技巧是将
a和
b参数放在一起:
# Code that defines the prior: p(a,b)∝(a+b)^(−5/2)@pm.stochasticdef ab(power=-2.5, value=[1,1]): if np.any(value <= 0): return -np.Inf return power * np.log(value[0]+value[1])a = ab[0]b = ab[1]
该笔记本有完整的示例。

在PyMC2中,技巧是将
a和
b参数放在一起:
# Code that defines the prior: p(a,b)∝(a+b)^(−5/2)@pm.stochasticdef ab(power=-2.5, value=[1,1]): if np.any(value <= 0): return -np.Inf return power * np.log(value[0]+value[1])a = ab[0]b = ab[1]
该笔记本有完整的示例。