-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameters in Gamma distribution #22
Comments
@gburtini Any thoughts on this? I'd like to finish the Gamma implementation (and chi^2 as a special case) with a pull request. |
Hey @mossadal, Sorry, I hadn't seen the issue. Please feel free to make this decision yourself. In general, I tried to remain congruent with Wikipedia's "first" expository parametrization, but this is totally arbitrary and it does not surprise me that I made an error in this particular case. :) |
Thanks, I'll get to this within the next few days. |
In my opinion, selecting one convention is rather important and I would like to select convention presented in Mathematica from Wolfram Research. Reasons:
I would like to change the interface of Gamma but worry about backward compatibility. Any versioning is there? I added version 1.0 to my last commit, we can break compatibility if a community will want it. This issue is similar to #32 |
Yep, I agree - let's go with the Mathematica standard. Feel free to institute semver in your next PR if we haven't already done that. I have it on my long term "like to do" list to come back to this repo. and really improve its engineering decisions. Thanks for chmining in @gustawdaniel |
The code for the Gamma distribution is very incomplete -- the class only basically only contains code for random number generation from a Gamma distribution.
I implemented the pdf, cdf, icdf as well as unit tests, and noticed that the parameters are named $shape and $rate, which would seem congruent with alpha and beta as described in Wikipedia's description of the Gamma distribution.
Running the unit tests on Gamma::draw gives a sample of points that seem to be Gamma(alpha, 1/beta) distributed, suggesting that $rate is really $scale.
What is your preference? Changing the parameters to $shape and $scale or keeping $shape and $rate and correct Gamma::draw?
The text was updated successfully, but these errors were encountered: