-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Updates to Mixture docs. #2799
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
Updates to Mixture docs. #2799
Conversation
pymc3/distributions/mixture.py
Outdated
# 2-Mixture Poisson distribution | ||
with pm.Model() as model: | ||
lam = pm.Exponential('lam', lam=1, shape=(2,)) # `shape=(2,)` indicates two mixtures. | ||
components = pm.Poisson.dist(mu=lam, shape=(2,)) # must use dist, not plain Poisson object! |
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.
I would adjust the comment a bit, maybe: # as we just need the logp, rather than add a RV to the model, we need to call .dist()
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.
Done!
minor wording change
Thanks @ericmjl! |
My pleasure! |
|
||
Example | ||
------- | ||
# 2-Mixture Poisson distribution |
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.
This doesn't display correctly. Need to add the code
tag.
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.
Just to check: should be .. code-block:: python
?
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.
http://livesphinx.herokuapp.com/ is directionally helpful
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.
(that is to say, yes, that's it, but then it needs a newline after it, and possibly indentation.)
@junpenglao @ColCarroll this is the new PR having nuked my fork and started over 😄.
Please review!