Quantum Bayesian Networks

February 22, 2017

Quantum Fog’s weight in bnlearn units

Filed under: Uncategorized — rrtucci @ 2:42 am

In a recent blog post entitled “R are Us. We are all R now”, I expressed my great admiration for the R statistical computer language, and I announced the addition to the Quantum Fog (QFog) GitHub repository of a Jupyter notebook called “Rmagic for dummies” which explains how something called Rmagic allows one to run both Python and R in the same Jupyter notebook.

In 2 other earlier blog posts, I also expressed great admiration for something else, bnlearn, an open source computer program written in R by Marco Scutari for learning classical Bayesian networks (cbnets) from data. I consider bnlearn the gold standard of bnet learning software.

The main purpose of this blog post is to announce that the QFog GitHub repo now has a folder of Jupyter notebooks comparing QFog to bnlearn. This is a perfect application of Rmagic to comparing two applications that can do some of the same things but one app is written in R while the other is written in Python. Pitting QFog against bnlearn is highly beneficial to us developers of QFog because it shows us what needs to be improved and suggests new features that would be worthwhile to add.

QFog can do certain things that bnlearn can’t (most notably, QFog can do both classical and quantum bnets, whereas bnlearn can only do classical bnets), and vice versa (for instance, bnlearn can do bnets with continuous (Gaussian) node probability distributions, whereas QFog can only handle discrete PDs), but there is much overlap between the 2 software packages in the area of structure and parameter learning of classical bnets from data.

A cool feature of the folder of Jupyter notebooks comparing bnlearn and QFog is that most notebooks in that folder can be spawned and run from a single “master” notebook. This amazing ability of the “master” notebook to create and direct a zombie horde of other notebooks is achieved thanks to an open source Python module called “nbrun” (notebook run).




  1. I guess you already know what programming language pirates use?

    Comment by wb — March 4, 2017 @ 3:53 am

  2. And they love to eat Ronzoni macaRoni

    Comment by rrtucci — March 4, 2017 @ 12:53 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: