I heard about ubers pyro and stumbled upon this Wikipedia article.
As I understand, a bayesian network is the same as a belief network according to this post.
Does someone know how these are related?
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.Sign up to join this community
A probabilistic program and a Bayesian Network are both ways of specifying probabilistic models. Any model that can be specified as a Bayesian Network can also be specified by a probabilistic program, in fact by a probabilistic program that has no control flow. Roughly
Bayes Nets == Straight line Probabilistic Programs
This Bayes Net is equivalent to the probabilistic program (in Pyro)
def model(): p_rain = pyro.param("p_rain", torch.tensor(0.2), constraint=unit_interval) p_sprinkler = pyro.param("p_sprinkler", torch.tensor([0.4, 0.01]), constraint=unit_interval) p_wet = pyro.param("p_wet", torch.tensor([[0.0, 0.9], [0.8, 0.99]]), constraint=unit_interval) rain = pyro.sample("rain", Bernoulli(p_rain)) sprinkler = pyro.sample("sprinkler", Bernoulli(p_sprinkler[rain.long()])) wet = pyro.sample("wet", Bernoulli(p_wet[rain.long(), sprinkler.long()]))
More generally, probabilistic programs can contain control flow (
while) and recursion. Some of these extra features are expressed in extensions to Bayes nets, e.g. some
for loops can be expressed as plates in Bayes Nets.