I am trying to build a hybrid Bayesian network (discrete and continues variables), learn the parameters from data, and then use the model for inference. Now I am wondering if this is possible in pymc3 and if so, is there some example code available?

Suggestions for other (Python) libraries are welcome as well. However, I’ve found that most of the available packages do not satisfy the requirements out of the box.

If the discrete variables are observed, this could be done relatively easily.

If they are latent, well… good luck…

To give a little more context: I am trying to model marketing campaign effects. The data contains several (discrete) campaign properties and effects in term of KPIs which are continuous (e.g. Revenue).

By doing inference, the goal is to see what type of campaigns are most likely to increase certain KPIs.

Any tips on how to proceed?

I recommend you look at Bayesian A/B testing (@springcoil has some nice notebooks), and hierarchical models, so you get a notion of how to handle observed discrete groups.

1 Like

I have exactly the same problem than you Dave_Ebbelaar!!! have you found any way to solve??

Thank you very much!