Take the 2-minute tour ×

I'm looking for a library to create Bayes nets and perform learning and inference on them in Scala (or Java, in case of lack of a better solution). The library should be actively maintained, performant, preferably easy, definitely well-documented unless the usage is really straightforward. Free, open-source and commercial alternatives are ok, but for commercial solutions a free trial is required.

An ideal solution would be the equivalent of what in the .NET world is Infer.NET by Microsoft Research, but more documented.

Thanks in advance!

share|improve this question
This might be helpful stackoverflow.com/questions/5363855/implement-bayes-net/… –  ŁukaszBachman Feb 2 '12 at 13:11
and here is direct link to weka (also mentioned in response Łukasz referred you to) –  wmz Feb 2 '12 at 13:14
@ŁukaszBachman: Thanks, but I've already looked at JavaBayes and found it old and not performant, although quite documented... –  emaster70 Feb 2 '12 at 13:59
add comment

4 Answers

up vote 6 down vote accepted

FACTORIE is a young project, but it fits the bill and is implemented in Scala:


It's developed by Andrew McCallum and his lab at UMass, who are also responsible for the hugely useful MALLET machine learning toolkit.

share|improve this answer
FACTORIE might be great, but it's not straightforward - at least to me - and the documentation falls very short of the requirement... +1 anyway –  emaster70 Feb 2 '12 at 14:02
Does FACTORIE support Bayesian network out of the box? –  Erik Allik Feb 17 at 20:45
add comment

Perhaps Banjo fits the bill? I'm not sure how actively it is developed, but I know it has been around for at least a few years ... (never used it myself).

Banjo: Bayesian Network Inference with Java Objects

share|improve this answer
add comment

Some Java alternatives to Infer.NET were presented as answers to this question. So, I think basically you're asking about either a follow up to that question (it was asked during the second half of 2010) with respect to Java or fully Scala-based solution.

share|improve this answer
add comment

You might want to look into SMILE. It is free and has Java API. Other free options in Java are UnBBayes and SamIam.



  • UnBBayes


  • SamIam

    Samiam includes two main components: a graphical user interface and a reasoning engine. The graphical interface lets users develop Bayesian network models and save them in a variety of formats. The reasoning engine supports many tasks including: classical inference; parameter estimation; time-space tradeoffs; sensitivity analysis; and explanation-generation based on MAP and MPE.

Pure Scala and free options are FACTORIE (already mentioned) and Figaro. But Figaro currently lacks learning part.

  • Figaro - Probabilistic Modeling


share|improve this answer
add comment

Your Answer


