Open feynmanliang opened 3 years ago
I did this some time ago (it uses from_dict
)
https://gist.github.com/ahartikainen/ca4ec935c78c56e2d352b8d34a286fd0
Not sure if posteriordb will add this kind of functionality, ArviZ might be a better place for it.
Thanks :) I'll go link this issue over there
Great @ahartikainen . This structure is based on the posterior R package structure and I use that structure to read and write the JSON posteriors, so I guess it would probably be something that would fit in the Arviz package, although I think it would be good to get reading in the gold standard to be part of the python posteriordb library.
Arviz provides nice visualization tools for posterior samples, but the current golden samples data format requires a pretty long dance to get it into an `InferenceData. For example, currently I am doing this to convert the eight schools golden samples into a format arviz can visualize:
Is there an easier way to do this that I am missing? If not, would it be worthwhile to package something like this up as a library method (or could
.reference_draws()
return anInferenceData
with the chain/draw/other dimensions set up)?