Skip to content
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

Tutorial for sampling the conditional #667

Merged
merged 1 commit into from
Mar 22, 2022
Merged

Conversation

michaeldeistler
Copy link
Contributor

@michaeldeistler michaeldeistler commented Mar 21, 2022

This adds documentation for sampling the conditional posterior. I added it to the end of the already existing tutorial on conditional distributions

"cell_type": "markdown",
"metadata": {},
"source": [
"Next, we follow the sampler interface and create a potential_function. The observation in this example is `x_o=[1, 1, 1, 1]`."
Copy link
Contributor

Choose a reason for hiding this comment

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

Just watching this from the sidelines. the meaning of potential_function is not discussed here. I also checked that in none of the previous tutorials, a potential_function is mentioned. It might be worthwhile to share here, what mathematical meaning you connect with the potential_function. It gives readers some context.

Copy link
Contributor Author

@michaeldeistler michaeldeistler Mar 21, 2022

Choose a reason for hiding this comment

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

Thanks for the input Peter! The potential function is expained in the sampler interface tutorial. Quote:

Next, we obtain the potential function. A potential function is a function of the parameter f(theta). 
The posterior is proportional to the product of likelihood and prior: p(theta|x) \propto p(x|theta)p(theta). 
The potential function is the logarithm of the right-hand side of this equation: f(theta) = log(p(x|theta)p(theta))
)

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, then I suggest to insert it in here too. Just in case people traverse the tutorials from start to end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, I specifically added a pointer to it.

Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

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

looks good to me, thanks a lot for addressing this!

@michaeldeistler michaeldeistler merged commit 3c8a83a into main Mar 22, 2022
@michaeldeistler michaeldeistler deleted the tutorial_cond branch March 22, 2022 07:54
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