z*****h 发帖数: 17 | 1 f(x) is proptional to
exp{-sum(v_i*(x-b_i))-(x-c)^2/(2s)}/product{1+exp(b_i-x)}
i=1 to 20, v_i, b_i, c, s 已知。sum表示和,product表示积。
请问有什莫方法可以模拟这种复杂的分布?可以用ratio of uniforms吗?
多谢您的任何帮助!!! | W*****k 发帖数: 158 | 2 acceptance-rejection
【在 z*****h 的大作中提到】 : f(x) is proptional to : exp{-sum(v_i*(x-b_i))-(x-c)^2/(2s)}/product{1+exp(b_i-x)} : i=1 to 20, v_i, b_i, c, s 已知。sum表示和,product表示积。 : 请问有什莫方法可以模拟这种复杂的分布?可以用ratio of uniforms吗? : 多谢您的任何帮助!!!
| z*****h 发帖数: 17 | 3 多谢!是不是可以把它看作两部分:Normal+其他. 其他小于1。只要generate Normal
and Uniform? Thank tremendous!!! | z*****h 发帖数: 17 | 4 Sorry. I think the problem is that the function is not normalized and it is
impossible to calculate the normalization constant. Can I still use accept-
reject? Any help will be high appreciated, | t***s 发帖数: 88 | 5 accept/reject 方法不需要做归一化
问题是你的PDF含有指数,如果最大值和最小值差别很大的话,用accept/reject方法效
率很低。可以考虑用monte carlo
is
【在 z*****h 的大作中提到】 : Sorry. I think the problem is that the function is not normalized and it is : impossible to calculate the normalization constant. Can I still use accept- : reject? Any help will be high appreciated,
| z*****h 发帖数: 17 | 6 f f(x) need not to be normalized, can I use the following algorithm?
1. Generate X~N(c,s), U~U(0,1)
2. Accept Y=X if U<=1(or sqrt(2pi*s)?)
3. Return to 1, otherwise
I'm confused about how to determine g(x)/f(x). If f(x) is density function,
there will be no confusion. But here f(x) is proptional to ...
Any help will be highly appreciated, |
|