Utilities for Learning Sparse Bayesian Networks

A set of tools for representing and estimating sparse Bayesian networks from continuous and discrete data, as described in Aragam, Gu, and Zhou (2017) .

Project Status: Active The project has reached a stable, usable state and is being actively developed. Travis-CI Build Status CRAN RStudio mirror downloads

A set of tools for representing and estimating sparse Bayesian networks from continuous and discrete data.


This package provides various S3 classes for making it easy to estimate graphical models from data:

  • sparsebnData for managing experimental data with interventions.
  • sparsebnFit for representing the output of a DAG learning algorithm.
  • sparsebnPath for representing a solution path of estimates.

The package also provides methods for manipulating these objects and for estimating parameters in graphical models:

  • estimate.parameters for directed graphs.
  • get.precision for undirected graphs.
  • get.covariance for covariance matrices.


sparsebnUtils 0.0.6


  • Added nchar argument to improve output of show.parents with long node names (#13)
  • openCytoscape now accepts title argument -- allows multiple cytoscape networks with different names to be open at the same time

sparsebnUtils 0.0.5


  • openCytoscape method added for compatibility with Cytoscape app (sparsebn #4)
  • select.parameter now works with discrete data
  • Added summary generics for sparsebnPath, sparsebnFit, sparsebnData, and edgeList objects
  • Added plot generic for sparsebnData objects
  • Added specify.prior method to simplify construction of black lists
  • Improve output when estimate.parameters is singular (#9)

Bug fixes

  • Fixed bug which caused permute.nodes to throw an error when passing in a user-specified node ordering
  • Correct error message for mixed data (#8)
  • Update documentation for conversion methods (#11)

sparsebnUtils 0.0.4


  • Added new random.graph method to generate random edgeLists


  • Conversion to and from sparse matrices using as.sparse is now significantly faster and supports Matrix input

sparsebnUtils 0.0.3

Major changes

  • get.solution() has been renamed select() (for consistency with select.parameter())


  • Added a NEWS.md file to track changes to the package
  • select() now uses fuzzy matching by default
  • Added new method get.nodes() to return node names from a sparsebn object
  • Improved output and print method for estimate.parameters() when using discrete data

Bug fixes

  • Graphics layout for plot.sparsebnPath() now accounts for omitted null graph
  • random.dag() now correctly accepts FUN for user-specification of RNG

sparsebnUtils 0.0.2

  • Initial stable release

Reference manual

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


0.0.8 by Bryon Aragam, 10 months ago


Report a bug at https://github.com/itsrainingdata/sparsebnUtils/issues

Browse source code at https://github.com/cran/sparsebnUtils

Authors: Bryon Aragam [aut, cre] , Jiaying Gu [aut]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports Matrix, stats, utils, methods, nnet

Suggests bnlearn, graph, igraph, network, RCy3, testthat

Imported by ccdrAlgorithm, discretecdAlgorithm.

Depended on by sparsebn.

See at CRAN