Bayesian Network Structure Learning from Data with Missing Values

Bayesian Network Structure Learning from Data with Missing Values. The package implements the Silander-Myllymaki complete search, the Max-Min Parents-and-Children, the Hill-Climbing, the Max-Min Hill-climbing heuristic searches, and the Structural Expectation-Maximization algorithm. Available scoring functions are BDeu, AIC, BIC. The package also implements methods for generating and using bootstrap samples, imputed data, inference.

R package for Bayesian Network Structure Learning from Data with Missing Values


Bayesian Networks are a powerful tool for probabilistic inference among a set of variables, modeled using a directed acyclic graph. However, one often does not have the network, but only a set of observations, and wants to reconstruct the network that generated the data. The bnstruct package provides objects and methods for learning the structure and parameters of the network in various situations, such as in presence of missing data, for which it is possible to perform imputation (guessing the missing values, by looking at the data). The package also contains methods for learning using the Bootstrap technique. Finally, bnstruct, has a set of additional tools to use Bayesian Networks, such as methods to perform belief propagation.

In particular, the absence of some observations in the dataset is a very common situation in real-life applications such as biology or medicine, but very few software around is devoted to address these problems. bnstruct is developed mainly with the purpose of filling this void.


The latest stable version of bnstruct is available on CRAN and can be installed with


from within an R session.

The latest development version of bnstruct can be found on GitHub here.

In order to install the package, it suffices to launch R CMD INSTALL path/to/bnstruct from a terminal, or make install from within the package source folder.

Being hosted on GitHub, it is also possible to use the install_github tool from an R session:


For Windows platforms, a binary executable of the latest stable version is available on CRAN.

bnstruct requires R >= 2.10, and depends on bitops, igraph, Matrix, graph and methods. Package Rgraphviz is requested in order to plot graphs, but is not mandatory.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.11 by Alberto Franzin, 7 months ago

Browse source code at

Authors: Francesco Sambo [aut] , Alberto Franzin [aut, cre]

Documentation:   PDF Manual  

Task views: gRaphical Models in R

GPL (>= 2) | file LICENSE license

Depends on bitops, igraph, methods

Suggests graph, Rgraphviz, qgraph, knitr, testthat

Imported by NIMAA, TGS.

Suggested by BoltzMM.

See at CRAN