Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def convert_params(mu, theta):
- """
- Convert mean/dispersion parameterization of a negative binomial to the ones scipy supports
- See https://en.wikipedia.org/wiki/Negative_binomial_distribution#Alternative_formulations
- """
- var = mu + theta * mu ** 2
- p = (var - mu) / var
- return theta, 1 - p
Add Comment
Please, Sign In to add comment