-
Notifications
You must be signed in to change notification settings - Fork 105
add new page on sampling keyword arguments #654
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
base: main
Are you sure you want to change the base?
Conversation
Preview the changes: https://turinglang.org/docs/pr-previews/654 |
It may make sense to specify exactly how thinning works in a similar way to the table in Thinning and warmup. This is because the thinning only applies to steps after discard_initial. This partiallye exists already, however doesn't note the interaction with num_warmup. This is relevant as if I specify |
``` | ||
::: | ||
|
||
## Thinning and warmup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably note that kwargs are forwarded to sample calls, which means that individual samplers may provide additional options to sample. This is relevant for HMC(...)
where it expects nadapts
and discard_adapt
to be passed to sample (rather than the sampler).
This also explains why num_warmup is only provided for some samplers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeahhh, I wasn't sure how to go about explaining this. HMC and NUTS just do weird stuff. I'll think about how to write it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into this a bit more. This is all a bit of a mess because nadapts is actually also a sampler parameter, but then it's fed through into the kwargs for sample. This is probably because the code for NUTS is quite old and hasn't kept up with interface changes.
My feeling right now is that we should remove nadapts from the sampler constructor and just make it use num_warmup instead to signify the number of adaptations. In that case, I would argue it's not worth documenting it right now — would that be fine?
This should, hopefully, document a bunch of things that were not documented.
Closes #647.