-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Adding option to include transformed variables in InferenceData #6232
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6232 +/- ##
==========================================
- Coverage 93.61% 89.79% -3.82%
==========================================
Files 101 101
Lines 22120 22129 +9
==========================================
- Hits 20707 19871 -836
- Misses 1413 2258 +845
|
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.
LGTM
Can you also comment on arviz-devs/arviz#2086 if that would be helpful or not and why? Will then that argument be used to indicate if the unconstrained group should be present? Or how will that work? Also, for tracking purposes, related to #5160 |
Thanks @lucianopaz and @OriolAbril!
I think arviz-devs/arviz#2086 is good. For my workflow, it's actually easier if the transformed variables live in the
I don't think this would be the right parameter (or interface) to use for the proposal in arviz-devs/arviz#2086. My proposal would be to implement the |
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.
While generally I'm not a fan of the InferenceDataConverter
, I do understand the motiviation behind your PR, and I think the implementation is fine.
LGTM with one nitpick about test performance
Co-authored-by: Michael Osthege <[email protected]>
Thanks @dfm |
…-devs#6232) * Adding option to include transformed variables in InferenceData Co-authored-by: Michael Osthege <[email protected]>
This tiny PR adds an optional parameter to the ArviZ
InferenceData
backend to allow the (optional, if requested) inclusion of transformed parameters in the returnedInferenceData
object'sposterior
extension. There is discussion about building out a more formal interface for this in future versions of ArviZ (see: arviz-devs/arviz#230, arviz-devs/arviz#2056, arviz-devs/arviz#2086), but it would be a huge quality of life improvement (for me!) to have this available as an advanced user feature. I regularly use this for debugging sampling issues and for post-sampling plotting of model elements - it is an absolutely crucial component of my workflow! As far as I know, the only way to access these traces currently is to use theMultiTrace
backend, which is annoying, since I'll always end up wanting to convert it to anInferenceData
manually anyways.Bugfixes / New features
to_inference_data
allowing the inclusion of transformed/unconstrained parameters in the returnedInferenceData
object