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

added generated_quantities to docs #1897

Closed
wants to merge 1 commit into from

Conversation

JasonPekos
Copy link
Member

Currently there's no mention of generated_quantities in the docs (at least, in the Using Turing section).

This PR attempts to add a quick explanation of the function along with an example use case — non-centred parametrization of Neal's funnel.

@devmotion
Copy link
Member

It's documented a bit in the docs of DynamicPPL (I assume since it is defined there): https://beta.turing.ml/DynamicPPL.jl/dev/api/#DynamicPPL.generated_quantities

@JasonPekos
Copy link
Member Author

JasonPekos commented Oct 24, 2022

Yeah, it's also used (but not explained) in the time series case study, so it definitely has some representation. Felt it was worth writing this up here because of this post, which is the top result right now (for me) when I search "reparametrization in turing".

The thread begins with discussion before generated_quantities was added:

We currently don’t have a good way to record the transformed variable, but you can apply the transformation after the inference. We will likely add a mechanism to track arbitrary variables soon.

It seems like there's a lot of support for adding the specific example of Neal's funnel:

Really nice. We should also add this to the Turing docs.

Yeah, I’d be delighted to see this added!

and then the post ends with a recent-ish post from after generated_quantities was added:

Is this possible now? I was just looking for the same thing. :slight_smile:
I don’t think I found it in the turing documentation.

So felt it would be worth to add, as I had a slightly more complicated version of this sitting around in my notes already. Also willing to implement the more complicated version (w notes on checking divergence diagnostics + images of the funnel) as a tutorial if that seems like a better fit.

@yebai
Copy link
Member

yebai commented Oct 27, 2022

Many thanks, @JasonPekos - I agree these are useful for the general documentation. I would suggest that we add a cross-reference to the DynamicPPL docs so the user can find more details there.

In addition, we are in the process of migrating all docs to jmd format and also moving them into the TuringTutorials repo (we might rename TuringTutorials to TuringDocumentation later to reflect this). Please see here for an example. It might be better to close this PR and open a new one against TuringTutorials to be future-proof. @cgbotta should be able to help with the new jmd format and/or workflow if needed.

Also willing to implement the more complicated version (w notes on checking divergence diagnostics + images of the funnel) as a tutorial if that seems like a better fit.

It sounds good to have a separate docs page on this.

@yebai
Copy link
Member

yebai commented Jul 30, 2023

Closed in favour of TuringLang/docs#414

@yebai yebai closed this Jul 30, 2023
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