Feature summary of BN structure learning in python pgm libraries

Posted on Sat 23 July 2016 in general

This is a (possibly already outdated) summary of structure learning capabilities of existing Python libraries for general Bayesian networks.


  • Discrete MLE Parameter estimation
  • Discrete constraint-based Structure estimation
  • Linear Gaussian MLE Parameter estimation
  • Linear Gaussian constraint-based Structure estimation

Version 1.1, released 2012, Python 2

bnfinder (also here)

  • Discrete & Continuous score-based Structure estimation
    • scores: MDL/BIC (default), BDeu, K2
    • supports restriction to subset of data set, per node
    • supports restrictions of parents set, per node
    • allows to restrict the serach space (max number of parents)
    • search method??
  • Command line tool

Version 2, 2011-2014?, Python 2


  • Discrete MLE Parameter estimation
  • Can be used to estimate missing values in incomplete data sets prior to model parametrization

Version 0.4, 2016, Python 2, possibly Python 3


  • PC constraint-based Structure estimation

Further relevant libraries include PyMC, BayesPy, and the Python Bayes Network Toolbox. Also check out the bnlearn R package, BNT or TETRAD for more functionality.