-
Notifications
You must be signed in to change notification settings - Fork 28
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
A chain to vector of NamedTuple
s utility?
#456
Comments
PS in comparison to |
You might be able to use the Tables.jl interface [here](https://github.com/TuringLang/MCMCChains.jl/blob/master/src%2Ftables.jl),
though I'm not sure how current it is. Can you try
```
using Tables
rows(chain)
```
or maybe
```
using Tables
rowtable(chain)
```
Edit: easily the worst formatted post I've ever made but my phone is not helping me edit it.
|
I added my pass CDCgov/Rt-without-renewal#235 to my project before I saw this. |
Cool, love it. Good to close? |
Would you want me to PR this utility to |
It depends on whether it's materially different from using the Tables.jl interface. If it is, then great, but if it provides roughly the same effect I'm not sure this is the home for it. Could you check the existing tables interface to see if it makes sense? |
using Tables
rowtable(chain) Does indeed give an iterable with NamedTuples for samples. Very nice. Definitely using this pattern in the future. |
Thanks so much! Appreciate your time. |
Hi everyone!
Functions like
condition
andgenerated_quantities
takeNamedTuples
as arguments (andDict
s). Sometimes this is really convenient, for example, in counter-factual modelling. Or in extending samples one model into a related model, e.g. for Bayesian forecasting.However, I can't find a utility that maps between a chain object and an iterable object of
NamedTuples
. If it doesn't exist I think this would be a useful addition!The text was updated successfully, but these errors were encountered: