Fitting a capped Poisson process with a variable rate

﹥>﹥吖頭↗ 提交于 2019-12-01 20:58:30

By "Capped" do you mean that it is a truncated Poisson? It appears thats what you are saying. If it were a left truncation (which is more common), you could use the TruncatedPoisson distribution, but since you are doing a right truncation, you cannot (we should have made this more general!). What you are trying will not work -- the Poisson object has no clip() method. What you can do is use a factor potential. It would look like this:

@pymc.potential
def clip(r=r):
    if np.any(r>10):
        return -np.inf
    return 0

This will constrain the values of r to be less than 10. Refer to the pymc docs for information on the Potential class.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!