Skip to content

WIP: Update LKJ notebook to not refer to Wishart #2184

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
May 15, 2017

Conversation

zaxtax
Copy link
Contributor

@zaxtax zaxtax commented May 14, 2017

As the Wishart is highly discouraged now, including the Wishart-Bartlett form, we should change the documentation to not refer to it, and even perhaps talk more about the LKJ distribution.

@junpenglao
Copy link
Member

junpenglao commented May 14, 2017

As the Wishart is highly discouraged now, including the Wishart-Bartlett form

Do you have a reference for that? I thought Bartlett form is ok.

@zaxtax
Copy link
Contributor Author

zaxtax commented May 14, 2017

The warning on line https://github.com/pymc-devs/pymc3/blob/master/pymc3/distributions/multivariate.py#L550 seems like a pretty strong nudge against the Bartlett form.

Maybe instead of saying the Bartlett form is highly discouraged, the LKJ is highly encouraged over the Wishart-Bartlett.

"Outside of the [beta](https://en.wikipedia.org/wiki/Beta_distribution)-[binomial](https://en.wikipedia.org/wiki/Binomial_distribution) model, the multivariate normal model is likely the most studied Bayesian model in history. Unfortunately, as this [issue](https://github.com/pymc-devs/pymc3/issues/538) shows, `pymc3` cannot (yet) sample from the standard conjugate [normal-Wishart](https://en.wikipedia.org/wiki/Normal-Wishart_distribution) model. Fortunately, `pymc3` *does* support sampling from the [LKJ distribution](http://www.sciencedirect.com/science/article/pii/S0047259X09000876). This post will show how to fit a simple multivariate normal model using `pymc3` with an normal-LKJ prior.\n",
"\n",
"The normal-Wishart prior is conjugate for the multivariate normal model, so we can find the posterior distribution in closed form. Even with this closed form solution, sampling from a multivariate normal model in `pymc3` is important as a building block for more complex models.\n",
"Outside of the [beta](https://en.wikipedia.org/wiki/Beta_distribution)-[binomial](https://en.wikipedia.org/wiki/Binomial_distribution) model, the multivariate normal model is likely the most studied Bayesian model in history. `Pymc3` supports sampling from the [LKJ distribution](http://www.sciencedirect.com/science/article/pii/S0047259X09000876). The LKJ distribution represents the distribution on correlation matrices and is conjugate to the multivariate normal distribution. This post will show how to fit a simple multivariate normal model using `pymc3` with a normal-LKJ prior.\n",
Copy link
Member

Choose a reason for hiding this comment

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

Pymc3 -> PyMC3

@twiecki
Copy link
Member

twiecki commented May 14, 2017

Thanks @zaxtax. I agree that we should change the doc strings too.

@junpenglao Wishart is pretty terrible (which form does not matter here): https://dahtah.wordpress.com/2012/03/07/why-an-inverse-wishart-prior-may-not-be-such-a-good-idea/

@zaxtax
Copy link
Contributor Author

zaxtax commented May 14, 2017

Just to clarify, should I also update the doc strings on Wishart-Bartlett to nudge people to LKJ there as well?

Change capitalization

Change capitalization
@junpenglao
Copy link
Member

junpenglao commented May 14, 2017

Just to clarify, should I also update the doc strings on Wishart-Bartlett to nudge people to LKJ there as well?

Yes you should do that as well then.
Actually, in that case maybe we should advice user to use LKJCholeskyCov, since currently it is the fastest one? @twiecki

@twiecki twiecki merged commit d4dd3dd into pymc-devs:master May 15, 2017
@zaxtax zaxtax deleted the lkj_notebook branch May 15, 2017 06:20
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