Replies: 1 comment 1 reply
|
Concrete case: Following up on the general point above with a specific, reproducible failure. Setup: A hierarchical model where roder (44 neighbourhoods) nest within distrikter (12 districts). The parameter I then want the 44 rode ridges coloured by their district. What works: What fails: In
Four axes, all from one district — the loop is at district granularity while the target lookup is at rode granularity. Reproduction: (arviz-plots 1.2.0, matplotlib backend): Same failure in plot_ridge and plot_forest. Question: Should If that's the intended direction I'm happy to attempt a PR — pointers on whether the fix belongs in |
Uh oh!
There was an error while loading. Please reload this page.
Hi all.
I note from working with the different plotting functionality, that hierarchies are not entirely without problems in arviz.
I wonder if this can somehow be implemented?
For what its worth, i have done some thinking regarding this subject:
First, the information is available though the coordinates of any particular dimension/coords declaration (for example, a hierarchy over geography, can be done by finest resolution, say region, but to each region coordinate, an associated assigned coordinate could assign the country, one level higher in the hierarchy: this is simply put a wide-format coordinate set depending on the level in the hierarchy, not an index and not an dimension since its simply a nested unit. ).
So implementation-wise the solution does not seem far away, but most plotting functions need handles for this.
I guess that what I'm asking about, is how this would be handled from the "grammar of graphics" angle, as this seem to be the handling the figures aim for in general.
As a continuation of the example above, plot_ridge could relatively easily do this in theory:
Two levels of parameters exists b_region, and b_country on level above.
this could be "solved" by allowing hierarchical ordering for labels across variables instead of having variables as foundation for anything else in this plot, as well as allowing the access to the second level of the region coordinates.
What I'm not saying is that there exists a universal handle for hierarchical models, but rather that hierarchical handling should exist, since the information is easily encoded though additional coordinate assignment when loading fits into datatrees anyway.
All reactions