-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix Rice distribution and add new parametrization (#3286) #3287
Conversation
pymc3/distributions/continuous.py
Outdated
@@ -3547,7 +3576,7 @@ def random(self, point=None, size=None): | |||
""" | |||
nu, sd = draw_values([self.nu, self.sd], | |||
point=point, size=size) | |||
return generate_samples(stats.rice.rvs, b=nu, scale=sd, loc=0, | |||
return generate_samples(stats.rice.rvs, b=nu/sd, scale=sd, loc=0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return generate_samples(stats.rice.rvs, b=nu/sd, scale=sd, loc=0, | |
return generate_samples(stats.rice.rvs, b=nu / sd, scale=sd, loc=0, |
Thanks @nbud. Can you add this to the release-notes? |
@twiecki Done and rebased |
Great, can merge when tests pass. Thanks! |
Looks like Travis failed due to a network error! |
Restarted it! |
Oops, I guess you wanted the order the other way around, can your ebase this one instead? |
Oh OK then! |
Fix for #3286
I redefined the parametrization: nu is now the noncentrality parameter, b is the shape parameter. Before, nu was inconsistently the noncentrality or the shape parameter.
An extra test was added.