Fast methods for learning sparse Bayesian networks from high-dimensional data using sparse regularization, as described in Aragam, Gu, and Zhou (2017)
sparsebn: A new R package for learning sparse Bayesian networks and other graphical models from high-dimensional data via sparse regularization. Designed from the ground up to handle:
The emphasis of this package is scalability and statistical consistency on high-dimensional datasets. Compared to existing algorithms,
sparsebn scales much better and is under active development. For more details on this package, including worked examples and the methodological background, please see our new preprint .
The main methods for learning graphical models are:
estimate.dagfor directed acyclic graphs (Bayesian networks).
estimate.precisionfor undirected graphs (Markov random fields).
estimate.covariancefor covariance matrices.
Currently, estimation of precision and covariances matrices is limited to Gaussian data.
The workhorse behind
sparsebn is the
sparsebnUtils package, which provides various S3 classes and methods for representing and manipulating graphs. The basic algorithms are implemented in
You can install:
the latest CRAN version with
the latest development version from GitHub with
devtools::install_github(c("itsrainingdata/sparsebn/", "itsrainingdata/sparsebnUtils/dev", "itsrainingdata/ccdrAlgorithm/dev", "gujyjean/discretecdAlgorithm"))
 Aragam, B., Gu, J., and Zhou, Q. (2017). Learning large-scale Bayesian networks with the sparsebn package. arXiv: 1703.04025.
 Aragam, B. and Zhou, Q. (2015). Concave penalized estimation of sparse Gaussian Bayesian networks. The Journal of Machine Learning Research. 16(Nov):2273−2328.
 Fu, F., Gu, J., and Zhou, Q. (2014). Adaptive penalized estimation of directed acyclic graphs from categorical data. arXiv: 1403.2310.
 Aragam, B., Amini, A. A., and Zhou, Q. (2015). Learning directed acyclic graphs with penalized neighbourhood regression. arXiv: 1511.08963.
 Fu, F. and Zhou, Q. (2013). Learning sparse causal Gaussian networks with experimental intervention: Regularization and coordinate descent. Journal of the American Statistical Association, 108: 288-300.
estimate.dagnow supports white lists and black lists (#6)
plotDAGnow includes labels for each subplot by default
NEWS.mdfile to track changes to the package
plotDAGto provide convenient default for plotting large graphs
estimate.dagnow takes an optional logical argument
TRUE, then an adaptive version of the CD algorithm will be run for discrete data. This argument is ignored for continuous data.