I had actually posted an earlier question about the applications of Bayesian networks, and I received a very good response. I understand that Bayesian networks are usually used to answer probability queries about the state of some variable given a set of interrelated variables--as defined by a dependency graph.

However, one of the key points made in the response was that Bayesian networks are not really used for stuff other than these types of queries. But at the same time, I have fit Hierarchical Bayesian Regression models, and obtained predictions and parameter estimates for models given some data. I imagine that it is really not that much different to get model predictions for an output value, given some set of inputs and a model.

Hence I was wondering whether I can generate predictions from a Bayesian network?

It might just be that I am getting hung up on the names without appreciating the underlying similarity. But it seems like if I set up a dependency graph, gather data on the different variables, and then use an MCMC sampler, I could obtain a prediction for some output variables given some input variables. To be more precise, I would get the posterior distribution of the join distribution of the variables, and from that I could obtain the best estimates for the predicted values of the output variables.

Here is a concrete example in case it helps. Say I am waiting for a guest to visit my home, and I have cameras positioned along the route that this individual will take. So the cameras will ping me when the person passes each of the cameras, but I don't know the rate of speed of the driver. I also know the weather and overall traffic conditions in the city. So given that there are a set of 5 sensors along the route, could I predict the time at which my guest will arrive. In this case, I have conditional independence between nodes, since nodes are essentially sequential and directed. So if my guest had crossed camera 2 out of 5, could I predict the time that he/she would arrive using a Bayesian network--or in this case would it just be Bayesian regression?

  • $\begingroup$ When I wrote that response I was thinking of what I thought was their primary utility - note that the general graphical models framework encompasses most of the models in ML that we would plausibly encounter. And you can do other things other than compute probabilistic queries, such as model parameter estimation, or estimating structure from data. It's just that it's easiest to see why they become useful in context of probabilistic queries. $\endgroup$
    – microhaus
    Mar 19, 2021 at 11:46
  • $\begingroup$ Probabilistic inference can also encompass computations of posteriors and posterior predictives. $\endgroup$
    – microhaus
    Mar 19, 2021 at 11:52
  • $\begingroup$ @microhaus yes, I totally understand. Your response was very complete in the sense of what Bayesian networks provide compared to existing statistical models. This question was really just about understanding Bayesian networks in the context of all bayesian models. I have fit bayesian regression before, but not bayesian networks. So everyone's contributions here really helps. $\endgroup$
    – krishnab
    Mar 19, 2021 at 18:26

1 Answer 1


Simplified Bayesian networks are graphical models to define joint probability distributions. The main use for such a joint distribution is to perform probabilistic inference or estimate unknown parameters from known data.

Bayesian networks and other generative probabilistic models like HMMs, Boltzmann machines can also be made to works as classifiers by estimating the class conditional density.

In general, regression is just like classification except the response variable is continuous. Take for instance the linear regression (statisticians "horse") especially in supervised case. How to get classification from linear regression?

With kernels linear regression can model nonlinear patterns and when continuous output (Gaussian) is replaced with binomial or multinational distribution you get the classification.

  • 1
    $\begingroup$ yes, thanks so much for confirming this intuition. I was getting too caught up in some of the mathematical implementation details that I was losing sight of the bigger and simpler picture. $\endgroup$
    – krishnab
    Mar 19, 2021 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.