Skip to content

Added Rat Tumour Example #3054

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 4 commits into from
Jun 28, 2018
Merged

Added Rat Tumour Example #3054

merged 4 commits into from
Jun 28, 2018

Conversation

Dpananos
Copy link
Contributor

Added notebook for rat tumor example in chapter 5 of BDA.

I was looking for some resources in python for Gelman's first example of hierarchical models in BDA but couldn't find any. I decided to write one myself.

I'd appreciate any feedback re: this example.

Added notebook for rat tumor example in chapter 5 of BDA
@junpenglao
Copy link
Member

junpenglao commented Jun 25, 2018

Looks nice! A few comments:

@Dpananos
Copy link
Contributor Author

I've omitted a discussion about transforms (as per your request on discourse) because the example no longer uses DensityDist. If you still feel an explanation is required, I'd be happy to include it. I just need to know what you'd like me to write.

Alternatively, we could use DensityDist in the example, but I would need a solution such that the estimates are not biased.

@@ -35,6 +35,7 @@ GLM
===

.. toctree::
notebooks/RatTumorExample.ipynb
Copy link
Member

Choose a reason for hiding this comment

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

Could you please move this to the last session of GLM, also change the title of the notebook:
rat tumor--> Hierarchical Binominal Model: Rat Tumor Example

"\n",
"We are free to specify a prior distribution for $\\alpha, \\beta$. We choose a weakly informative prior distribution to reflect our ignorance about the true values of $\\alpha, \\beta$. The authors of BDA3 choose the joint hyperprior for $\\alpha, \\beta$ to be\n",
"\n",
"$$ p(\\alpha, \\beta) \\propto (\\alpha + \\beta) ^{-5/2} \\>.$$\n",
Copy link
Member

@junpenglao junpenglao Jun 27, 2018

Choose a reason for hiding this comment

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

The math rendering looks a bit odd, i believe \\>. are not needed:
screen shot 2018-06-27 at 8 06 38 am

@Dpananos
Copy link
Contributor Author

Changes made.

"Our joint posterior distribution is\n",
"\n",
"$$p(\\alpha,\\beta,\\theta \\lvert y) \n",
"\\propto \\>\n",
Copy link
Member

Choose a reason for hiding this comment

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

a few \\> still need to be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got em

@junpenglao junpenglao merged commit d1a1328 into pymc-devs:master Jun 28, 2018
@junpenglao
Copy link
Member

Awesome, thanks!

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.

2 participants