Archive for August, 2013
identi.ca updates
- Is anybody experiencing issues to start #IPython notebook with google chrome on #mac? http://t.co/HZySQV3PLh 2013-08-29
- RT @sc_k: Jim Geelen (University of Waterloo) and his colleagues have proved Rota’s Conjecture https://t.co/QqMmtIfKAy (http://t.co/9Qgyqb1… 2013-08-29
Gamma Function in Scipy.Special
I was playing with the Gamma Distribution Function in python. As typically, I used a combination of bumpy numpy arrays and the scipy.special functions for Gamma and incomplete gamma functions. At one point I realized that the Gamma distribution function (bottom panel on the figure below) was not reaching unity for large x values and for some parameters (k=0.63, theta=0.05). In the given case, the deviation was about 0.3 in probability space, which is significant.
Note: The Gamma Distribution Function (its cdf or pdf) is not the same thing as the Gamma function!
The solution I came up with is to use the module mpmath. When I do, everything looks fine.
I googled only briefly, but did not find any description of this error in scipy.special. Also I am not sure, if using mpmath is the best/fastest/most elegant solution. However, at least it seems to work.