Library for Bayesian Networks [closed]
Asked Answered
G

3

16

Hello fellow Number crunchers

As the headline suggests, I am looking for a library for learning and inference of Bayesian Networks. I have already found some, but I am hoping for a recommendation.

Requirements in a quick overview:

  • preferably written in Java or Python
  • configuration (also of the network itself) is a) possible and b) possible via code (and not solely via a GUI).
  • source code available
  • project is still maintained
  • the more powerful, the better

Which one do you recommend ?

Glassful answered 19/12, 2010 at 14:58 Comment(1)
I am the OP and I have voted to delete this question, since it is also my personal goal to keep the SE-sites clean.Glassful
B
11

Have a look at Weka. It's kind of popular in my neck of the woods... It's open source and written in Java.

This will tell you about bayesian networks in Weka, from the abstract:

  • Structure learning of Bayesian networks using various hill climbing (K2, B, etc) and general purpose (simulated annealing, tabu search) algorithms.
  • Local score metrics implemented; Bayes, BDe, MDL, entropy, AIC.
  • Global score metrics implemented; leave one out cv, k-fold cv and cumulative cv.
  • Conditional independence based causal recovery algorithm available.
  • Parameter estimation using direct estimates and Bayesian model averaging.
  • GUI for easy inspection of Bayesian networks.
Borlow answered 27/12, 2010 at 13:2 Comment(2)
Weka is indeed powerful, however it is not clear how complicated it is to define a network structure instead of learning it. The manual indicates that it is possible, though. (+1) for the link to the bn manual. (off-topic: Interesting in participating in stats.stackexchange ? We need more machine learners over there ;))Glassful
I found the Weka learning curve rather steep, but I think it's worth it. I am indeed on stats.stackexchange, just not terribly active :)Borlow
I
8

So here I give my subjective answer.

From my experience everything related to statistics is best solved with R. I have seen this often that in fields related to statistics, R has the most libraries and very often the most state-of-the-art algorithms/methods implemented.

Most programmers like me like to stay with the languages that they know, and learning something new is a trade off, mainly because it's time consuming.

So if learning a new language is a viable option, R is a good choice, in my opinion the best.

Take a brief look at the R libraries related to Bayesian Networks and Bayesian Interference.

Baysian: http://cran.r-project.org/web/views/Bayesian.html

Graphical Models: http://cran.r-project.org/web/views/gR.html

Machine Learning: http://cran.r-project.org/web/views/MachineLearning.html

The main advantages of R:
- easy to install a library: install.packages("RWeka")
- the help format and style is the same for all libraries
- if you know R, it's easy to switch from one library to the next. So it's easy to test all available libraries and then use the one that fits best

Iliad answered 29/3, 2011 at 22:49 Comment(1)
Thank you for the reply. I actually know R, but sometimes it is not only what the best language is, but also the question whether to introduce yet another language into an existing environment (which includes that more than one has to be trained with the language). I had my reasons for asking for Java, but nevertheless thank you the links. Did not know them.Glassful
C
2

Never used it, but perhaps the MALLET library fits the bill?

Chapiter answered 21/12, 2010 at 16:58 Comment(3)
(+1): Didn't find that one. It looks promising.Glassful
Mallet itself is very popular for NLP stuff. I haven't used it but it seems solid, actively developed and is quite well documented. The graphical models stuff seems a bit 'bolted on' to the main package though.Chapiter
@StompChicken How can we create Bayesian Network using mallet?Blais

© 2022 - 2024 — McMap. All rights reserved.