GOBNILP is a C program which uses SCIP ( http://scip.zib.de/ ) to learn Bayesian network structure from complete discrete data (or precomputed local scores). The version of GOBNILP that exists in this git repo is only guaranteed to work with SCIP 5.0.0. (It has yet to be 'tuned' to account for the changes between SCIP 4.0.0 and SCIP 5.0.0, so performance is typically worse than was the case with SCIP 4.0.0.) This repo also includes simple_gobnilp.py a simplified Python version of GOBNILP which works with Gurobi.
When installing SCIP 5.0.0 install it using "make" rather than "cmake". GOBNILP cannot make use of the new symmetry breaking methods available in SCIP 5.0.0 so the following assumes you have not installed a version of SCIP which has access to these new methods. (If, however, you do install SCIP 5.0.0 with the "SYM=bliss" option you can still use GOBNILP with it, you will just be obliged to add the "SYM=bliss" option when making GOBNILP.)
Let us suppose you have installed SCIP in the directory ~/local/src/scipoptsuite-5.0.0/scip. Then to install the latest (unstable!) GOBNILP from this repo just do:
git clone https://bitbucket.org/jamescussens/gobnilp.git cd gobnilp/ ./configure.sh ~/local/src/scipoptsuite-5.0.0/scip make
The 'configure.sh' script mentioned just above copies (and alters) files from SCIP which cannot be included in this repo for licensing reasons. If you have CPLEX installed (and accessible to SCIP) be sure to do 'make LPS=cpx' instead of plain 'make' since this will lead to considerably faster solving. (Note that if you have installed SCIP with the option "SYM=bliss" then you will need to do 'make SYM=bliss' (or 'make SYM=bliss LPS=cpx').)
For full details on GOBNILP (including installation instructions for the stable release), please consult the GOBNILP page:
and in particular the manual:
If you wish to extend GOBNILP in some way it is best to exploit SCIP's modular architecture to do so. For example,
To allow the user to add a new sort of constraint to GOBNILP you should add a new "constraint handler" to GOBNILP. See e.g. cons_dagcluster.c in the source, this implements the key acyclicity constraint. Also see cons_ci.c which implements user-defined conditional independence constraints. For general details on constraint handlers in SCIP, see: http://scip.zib.de/doc/html/CONS.php
To add a new heuristic algorithm (to generate better incumbent solutions ) you should add a "primal heuristic". GOBNILP currently has only one of these: heur_sinks.c. For general info on primal heuristics in SCIP see http://scip.zib.de/doc/html/HEUR.php
ONGOING DEVELOPMENT WORK
- Samuel Vozza has written code to allow GOBNILP to learn Gaussian networks, but this has yet to be merged into the master branch.
- Scott MacGregor is currently working on an R package for GOBNILP.
Here are some things which are missing from GOBNILP but which could be added:
- Adding a pricer so that "family variables" are created only if they loosen ( ie increase ) the dual bound, rather than all at once at the beginning of solving.