Skip to content

Draft intro page#2393

Merged
junpenglao merged 12 commits intomasterfrom
intro_doc
Aug 5, 2017
Merged

Draft intro page#2393
junpenglao merged 12 commits intomasterfrom
intro_doc

Conversation

@fonnesbeck
Copy link
Member

No description provided.

Copy link
Member

@aseyboldt aseyboldt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote down some random stuff, feel free to ignore if you don't agree (english isn't even my native language after all ;)

:Web site: https://github.com/pymc-devs/pymc3


Purpose
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a section title. It's kind of obvious that we introduce pymc here :-)

Purpose
=======

PyMC3 is a probabilistic programming module for Python that allows users to fit Bayesian models using a variety of numerical methods, most notably, Markov chain Monte Carlo (MCMC) and variational inference (VI). Its flexibility and extensibility make it applicable to a large suite of problems. Along with core model specification and fitting functionality, PyMC3 includes methods for summarizing output, plotting, goodness-of-fit and model diagnostics.
Copy link
Member

@aseyboldt aseyboldt Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rules for commas in English are a bit of a mystery to me, but do we need the comma after "most notably"?
"suite of problems" sounds a bit strange to me (but there are a lot of google hits, so maybe that is a thing after all). How about something like "It it being used in biology, astronomy, physics, the social sciences, business and finance and can be extended to fit new needs" (we might want to check that list however). I guess that would cover "flexibility".
Maybe "... fitting functionality, PyMC3 can visualize its results and provides model diagnostics."?

Features
========

PyMC3 strives to make Bayesian modeling as simple and painless as possible, thereby allowing users to focus on their scientific problem, rather than on the methods used to solve it. Here is a partial list of its features:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"thereby allowing" -> "to allow"?
I don't think we need the second sentence. Clear from context.


PyMC3 strives to make Bayesian modeling as simple and painless as possible, thereby allowing users to focus on their scientific problem, rather than on the methods used to solve it. Here is a partial list of its features:

* Fits Bayesian statistical models using modern techniques, including MCMC and VI.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third person sounds a bit strange. Maybe imperative? Or just "Modern techniques for fitting Bayesian stats models..."
Replace MCMC by hamiltonian MCMC and no abbreviations.


* Uses Theano as the computational backend, allowing for fast expression evaluation, automatic gradient calculation, and GPU computing.

* Includes a module for Gaussian process modeling.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Build-in support for Gaussian process modeling"


* Creates summaries including tables and plots.

* Several convergence diagnostics are available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Model checking and convergence detection"

with the full power of Python.


What's new in version 3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mabe just mention that it is a rewrite, but not much detail. That could be on a separate page pymc2 vs pymc3. I could be very wrong about this, but so far I didn't have the impression that most pymc3 users also knew pymc2. For those users the comparison is kind of pointless. Also, this kind of ends up repeating the feature list from above.
The important part of this is I think mentioned in the history section.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to restrict this list to differences. We do get a fair number of users moving over, and probably will get more now that v.3 is released.


First, import the PyMC3 functions and classes you will need for building your model. You can import the entire module via `import pymc3 as pm`, or just bring in what you need::

from pymc3 import Model, Normal, invlogit, Binomial, sample, traceplot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much everywhere we are using import pymc3 as pm. So I think we should do the same thing here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both are valid. I've noted the option for pm above.

theta = invlogit(alpha + beta*dose)

# Model likelihood
deaths = Binomial('deaths', n=n, p=theta, observed=np.array([0, 1, 3, 5]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the definition of the observations before the model def?


Save this file, then from a python shell (or another file in the same directory), call::

with bioassay_model:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation is strange

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't se a problem locally. I will double check.

@fonnesbeck
Copy link
Member Author

Thanks! I've integrated several of these suggestions.

@aseyboldt
Copy link
Member

@fonnesbeck Is this finished?

@fonnesbeck
Copy link
Member Author

Yeah, I think so. It can be improved with subsequent PRs if desired.

@junpenglao junpenglao merged commit 6e04322 into master Aug 5, 2017
@junpenglao junpenglao deleted the intro_doc branch August 5, 2017 05:47
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