5.1.2 采样
什么是采样?
采样方法
from scipy.stats import norm,gamma
a = norm.rvs() # 从高斯分布中采样
print(a)
b = gamma.rvs(1) # 从伽马分布中采样
print(b)方法1:逆变化采样(Inverse Transform Sampling)
方法2:接受-拒绝采样(Accept-Reject Sampling)


方法3:Metropolis-Hasting采样

最后更新于