Bayesian networks in Scala [closed]
Asked Answered
D

5

9

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!

Disencumber answered 2/2, 2012 at 12:46 Comment(3)
This might be helpful https://mcmap.net/q/1173261/-implement-bayes-net/…Afloat
and here is direct link to weka (also mentioned in response Łukasz referred you to)Pedigo
@ŁukaszBachman: Thanks, but I've already looked at JavaBayes and found it old and not performant, although quite documented...Disencumber
S
9

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

FACTORIE is a toolkit for deployable probabilistic modeling, implemented as a software library in Scala. It provides its users with a succinct language for creating relational factor graphs, estimating parameters and performing inference.

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

Sampler answered 2/2, 2012 at 13:34 Comment(3)
FACTORIE might be great, but it's not straightforward - at least to me - and the documentation falls very short of the requirement... +1 anywayDisencumber
Does FACTORIE support Bayesian network out of the box?Kansas
I've spent the last 24 hours on FACTORIE and I'm almost ready to run a naivebayes algorithm (I think). I really like the organization but the documentation is SEVERELY lacking, as @Disencumber mentionedWarfare
J
4

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

  • SMILE

    SMILE (Structural Modeling, Inference, and Learning Engine) is a fully portable library of C++ classes implementing graphical decision-theoretic methods, such as Bayesian net-works and influence diagrams, directly amenable to inclusion in intelligent systems.

  • UnBBayes

    UnBBayes is a probabilistic network framework written in Java. It has both a GUI and an API with inference, sampling, learning and evaluation. It supports BN, ID, MSBN, OOBN, HBN, MEBN/PR-OWL, PRM, structure, parameter and incremental learning.

  • 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

    Figaro models are data structures in the Scala programming language, which is interoperable with Java, and can be constructed, manipulated, and used directly within any Scala or Java program.

Jochbed answered 6/7, 2012 at 18:26 Comment(0)
T
1

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

Telemeter answered 2/2, 2012 at 16:13 Comment(0)
M
1

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.

Martella answered 7/2, 2012 at 14:21 Comment(0)
U
1

There is a Scala lib out there by now:

https://github.com/danielkorzekwa/bayes-scala

Unifoliate answered 3/1, 2015 at 22:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.