Skip to content

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

Merged
merged 2 commits into from
Apr 6, 2017

Conversation

springcoil
Copy link
Contributor

@springcoil springcoil commented Mar 29, 2017

These can probably be moved around a bit.

#1968

@@ -0,0 +1,8 @@
*****
Copy link
Member

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.

@@ -0,0 +1,8 @@
********
Copy link
Member

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.

.. code:: ipython
>>> with pm.Model() as model:
... b0 = pm.Normal('b0', mu=0, sd=100)
... yest = b0 * X
Copy link
Member

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?

... yest = b0 * X
...
>>> with model:
... trc = pm.sample(100)
Copy link
Member

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)

@@ -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
Copy link
Member

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

@springcoil
Copy link
Contributor Author

Updated this - thanks.

@twiecki twiecki merged commit 4034738 into master Apr 6, 2017
@twiecki twiecki deleted the model_docs2 branch April 6, 2017 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants