Kruschke diagrams as an option in model_to_graphviz
or with a separate model_to_kruschke
#7583
Replies: 3 comments 4 replies
-
@opherdonchin the biggest challenge is how to include plots somewhere in graphviz / another visualization library. Getting draws / a representation of the distribution would be easy. If you can figure that out, you'll be more than halfway there |
Beta Was this translation helpful? Give feedback.
-
Kruschke diagrams use "predefined" distributions/shapes, for instance, all Beta distributions are represented with Beta(2, 2) (or something similar) independent of the actual parameters in the model. Not sure if you are suggesting a different route, i.e. dynamically computing the shapes/images, instead of using predefined ones. Using predefined images is not only simpler, it's usually preferred as it will be easier to get the "structure" of the model at first glance. For manually doing Krusche diagrams I have been using this libre office template https://www.sumsar.net/blog/2013/10/diy-kruschke-style-diagrams/ |
Beta Was this translation helpful? Give feedback.
-
Certainly, we could take templates from either A second challenge is to represent computed nodes. The computation isn't usually shown in traditional diagrams, but is generally part of the Krushke diagrams. Can we turn a computed node in a PyTensor graph into Latex? (I found a pymc.printing in v5.5 but I didn't see it in the current version) Manually drawn Krushcke diagrams also have the arrow from the priors of parameters in the computation pointing to the relevant variable. Having the computation and the appropriately directed arrow makes the diagrams much more accessible. Finally, Kruschke diagrams are not well specified when it comes to dimensions and shapes, at least as far as I know. When I teach, I use subscripts indicating dimensions on variable names. Perhaps this would work? I also add them to the arrows, but maybe that's not necessary. |
Beta Was this translation helpful? Give feedback.
-
Kruschke plots, as used in Doing Bayesian Data Analysis, and as described in this blog post are preferred by many users to the style of diagramming produced by
model_to_graphviz
. I've looked a bit at the code, and I don't think it should be hard to modify it to create Kruschke diagrams.I'm scared to start on my own. I'd like a collaborator or a mentor to help me go through the process step by step.
I'm interested in hearing from people who would be interested and also on general thoughts both about the idea and about how to go about the actual programming.
Thanks!
Opher
Beta Was this translation helpful? Give feedback.
All reactions