0

I have search and saw some questions on the matter but without answer (due to the fact that the questions were asked more than 1 year ago, I. hoped something has changed)

I am looking for a library to infer bayesian network from a file of continious variables is there anything simple\out of the box that any one has encountered? I have tried pyAgrum for example but when i run

pyAgrum.BNLearner(numdata).learnDAG()

I get

Exception: [pyAgrum] Wrong type: Counts cannot be performed on continuous variables. Unfortunately the following variable is continuous: V0

Have tried serval libraries but they all seem to work only on discrete variables would love some help in advance.

Rogério Arantes
  • 712
  • 1
  • 8
  • 29

1 Answers1

5

The main question is what kind of model do you want for your continuous variables.

1- Do you want them to be discretized : you can have a look for instance at http://webia.lip6.fr/~phw/aGrUM/docs/last/notebooks/Discretizer.ipynb.html.

2- Do you want to assume a linear gaussian model : you can have a look for instance at bnlearn (https://haipengu.github.io/Rmd/GBN.html)

3- Do you want to learn more general continuous model : You can have a look at for instance otagrum (http://openturns.github.io/otagrum/master/) which learns copula bayesian network.

4- etc.

  • This should be a comment. Answers must answer the question. A link to a resource is not an answer. – Pranav Hosangadi Sep 28 '21 at 21:31
  • The question is to find a library to infer Bayesian network from a file of continuous variables. The answer proposes links to 3 different libraries to infer Bayesian network from continuous data. – Pierre-Henri Wuillemin Sep 28 '21 at 21:42
  • Questions asking for library recommendations are specifically mentioned as [off-topic](/help/on-topic). You could demonstrate how to do what OP wants with one of your suggested libraries and that would be a great answer, but "check this library out" is not an answer. – Pranav Hosangadi Sep 28 '21 at 21:59
  • I agree that the question is off-topic but the answer does answer the question "*I am looking for a library ...*". I don't agree that an example creating data and illustrating a package should be added to the answer as this would also be off-topic as SO is not about providing tutorials but answering specific programming questions. ps I hadn't heard of otaGrum so thanks for the heads up. – user20650 Sep 29 '21 at 11:08