Extracting effect size

I want to preface that I’m mostly a software engineer and less of a data scientist so I my understanding may be incomplete or I may be understanding some of these concepts incorrectly.

I’ve got a DAG that represents causality initially derived from interviewing experts. The DAG is in the shape of a tree that has a combination of nodes for which some are observable meaning I can derive it’s binary state and probability directly from data, these nodes are the leafs. There is a middle tier that are partially observable and the input into these nodes is either the output of the leaf classification, and optionally some metrics that will reflect the status of the node but these metrics are sometimes incomplete in that they only partially reflect the state of the node. And finally I’ve got the head which reflects the final output.

Given an input dataframe I’d like to extract the output, probability, uncertainty and most important causality in the form of which of the inputs contributed most to the classification as a ranked list. The first 2-3 are relatively clear given the tutorials, but the causality in Pyro is throwing me for a little bit of a loop. It’s my understanding that I should be able to get the coefficients to extract effect size but I’m not sure how to do that using the API. Can someone point me in the correct direction please. Thanks!

Sort of solved my own problem, it’s lies in this example.

It’s a combination of these two decorators/functions and keeping track of the state.

@infer_discrete(first_available_dim=-1, temperature=0)

State tracking is a little obscure, and seems to be model dependent.