Gamma distribution fit error

孤人 提交于 2019-12-02 11:38:01

(This is really a comment, but I want to show the plot that I get.)

Are you sure you used floc=0 in the fit method when you made the plot? If I leave it out (or if I make the mistake--as I frequently do--of using loc=0 instead of floc=0), I get a plot that looks like the one you included.

Which versions of scipy and numpy are you using?

With scipy 0.12.0 and numpy 1.7.1, your code works for me. I added a couple print statements, and I get:

alpha1 = 1.86456504055  beta1 = 8.47415903767
alpha2 = 1.17943740138  beta2 = 86.51957394

along with the plot:

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