Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 python 的初学者,正在学习使用 MCMC 采样方法,使用 python 的 emcee 包。作为初学者练习,我想对 Maxwell-Boltzmann 分布进行采样。我有一个示例代码,它对高斯进行采样,通过下面的函数定义;
def lnprob(x, mu, icov): diff = x-mu return -np.dot(diff,np.dot(icov,diff))/2.0
我将如何以相同的方式表达 Boltzmann 分布?