-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Updating docs - Added an example to sampling and added sampling to the docs #1970
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
Conversation
@@ -0,0 +1,8 @@ | |||
***** |
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.
You need to add new files to the toctree in source/api.rst
, or they won't show up in the documentation.
docs/source/api/sampling.rst
Outdated
@@ -0,0 +1,8 @@ | |||
******** |
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 is already in inference.rst
.
pymc3/sampling.py
Outdated
.. code:: ipython | ||
>>> with pm.Model() as model: | ||
... b0 = pm.Normal('b0', mu=0, sd=100) | ||
... yest = b0 * X |
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 do anything. Did you forget an observed var here?
pymc3/sampling.py
Outdated
... yest = b0 * X | ||
... | ||
>>> with model: | ||
... trc = pm.sample(100) |
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'd prefer trace = pm.sample(2000, tune=1000, njobs=4)
pymc3/sampling.py
Outdated
@@ -149,6 +149,30 @@ def sample(draws, step=None, init='ADVI', n_init=200000, start=None, | |||
------- | |||
trace : pymc3.backends.base.MultiTrace | |||
A `MultiTrace` object that contains the samples. | |||
|
|||
Examples |
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.
Good idea, that was definitely missing.
nit: bad indent
Updated this - thanks. |
These can probably be moved around a bit.
#1968