Improve documentation on InferenceData.map
See original GitHub issue- Is InferenceData.map always done elementwise or is some sort of reduction applied?
- What is the function signature (particularly input shape and output shape) expected for a function passed to map? Currently, the docs just say “fun: callable / Function to be applied to each group.”
For example, suppose you want to evaluate a new function of the model parameters (iterated for each step in each chain). Often, one might use pymc3.Deterministic
to add those to the compute graph during model sampling, but I imagine that InferenceData.map
might be a nice way to run such calculations without having to build it into the original compute graph at training time. I think a couple of examples and some guardrails on what fun ought to be might improve the usability here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
arviz.InferenceData.map — ArviZ dev documentation
Applies fun groupwise to the selected InferenceData groups and overwrites the group with the result of the function. Parameters. funcallable. Function to be ......
Read more >InferenceData extensions [Discussion] · Issue #1066 - GitHub
InferenceData objects are central to ArviZ, and even though a common subset of tasks ... Improve documentation on InferenceData.map #1252.
Read more >arviz.InferenceData.rename_dims
Returns a new object with renamed dimensions only. rename. Perform xarray renaming of variable and dimensions on all groups of an InferenceData object....
Read more >Inference — PyMC3 3.11.5 documentation
InferenceData, or MultiTrace), or a list of list containing dicts from find_MAP() or points. The number of traces should be equal to the...
Read more >Google Cloud documentation
Develop ASP.NET apps in Visual Studio on Google Cloud. Workflows. Orchestrate and automate Google Cloud and HTTP-based API services with serverless workflows.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI, I was able to figure out my use case combining arviz + xarray + sklearn metrics. I spent several hours staring at the docs for
wrap_xarray_ufunc
and eventually was able to identify the following pattern:Closing, as the doc improvement has been merged and released in 0.9.0, but feel free to reopen if needed 😉