arviz-devs / arviz-devs/InferenceObjects.jl
Utility for flattening a `Dataset`
- Dominant language
- Julia
- Stars
- 15
- Forks
- 1
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 1
Description
Several plots and diagnostics operate only on marginals; as a result, we have a need for a utility function that flattens a `Dataset` to a single variable with 3dimensions: `(chain, draw, var_name)`. For some variable `x` with dims `(chain, draw, dim1, dim2)`, `dim1=[:a, :b]`, and `dim2=[1, 2]`, `var_name` would have dimensions like `[x[a,1], x[b, 1], x[a, 2], x[b, 2]]`.
This utility should have a short name and simple syntax so that it can be used where tables are expected. The return value should be a `DimArray`. Alternatively, a subset of variables to be flattened could be specified, or variables to be flattened independently could be specified. The latter would facilitate making a corner plot.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.