I have two doubt, one about theory and one about practical problem.

First i have not full understand how to work a bayesian network with continuous values. I have learn that i can approximate P(A) (the probability of node A) with a Gaussian Distribution. But i have a dataset, mean and variance of the Gaussian Distribution is the mean and the variance of the dataset ?

And if i have P(A|B,C), with A and B with continuous values, how i can represent with a Gaussian Distribution?

The practical problem is i need to learn a a Bayesian Structure from a continuous values Dataset and i use this toolbox for matlab: http://code.google.com/p/bnt/ (Bayes Net Toolbox for Matlab by Kevin Murphy)

Now how i can use to learn a Bayesian Structure from a Dataset (of continuous values) with this tools?

If i use learn_struct_K2 function i need the order of nodes but where i can get this order? There are other useful functions in this toolbox that you know? (About this problem)

  • $\begingroup$ I have a similar problem, did you find a way to do it? I would appreciate some advice. Cheers. $\endgroup$
    – user45208
    May 8, 2014 at 14:26
  • 1
    $\begingroup$ @Neptune, General answer to this is: toolboxes and modules for structure learning, parameter learning, and inference for BN's with continuous nodes is a very under-developed topic. The vast majority of BN applications discretise their continuous values. $\endgroup$
    – Zhubarb
    May 8, 2014 at 15:00
  • $\begingroup$ and I'm go to discretise too. $\endgroup$
    – Neptune
    Jul 4, 2014 at 19:50

1 Answer 1


I guess its late for answering the question. nevertheless I will still leave my answer so that the future viewers can seek help from it.

1) Bayesian Networks are designed to reason about static process. and the observations has to be discretised (in case of continuous Node variables.) It is to be noted that it is a best practice that the continuous nodes are discritised in regular intervals. Also, if you want to work with continuous nodes you can check the concept introduced in this paper. This helps in both continuous variable and Temporal dimension problem.

2) To get Node ordering for method "learn_struct_K2" you can use either of the following methods.

  • Based on dataset, you can for the node ordering using Hierarchy, domain Knowledge and Previous literature work (e.g. For a Bayesian Network with disease progression one can easily attain some hierarchy of node from literature or expert practitioner)
  • For unsupervised Node ordering based on data methods like sampling Gibbs Sampling, Greedy Tree structure learning methods can be used. and based on the tree structure a topological sorting can give you a proper node ordering.

Hope this helps!


Your Answer

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

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