50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

BiDAG (version 2.1.4)

Bayesian Inference for Directed Acyclic Graphs

Description

Implementation of a collection of MCMC methods for Bayesian structure learning of directed acyclic graphs (DAGs), both from continuous and discrete data. For efficient inference on larger DAGs, the space of DAGs is pruned according to the data. To filter the search space, the algorithm employs a hybrid approach, combining constraint-based learning with search and score. A reduced search space is initially defined on the basis of a skeleton obtained by means of the PC-algorithm, and then iteratively improved with search and score. Search and score is then performed following two approaches: Order MCMC, or Partition MCMC. The BGe score is implemented for continuous data and the BDe score is implemented for binary data or categorical data. The algorithms may provide the maximum a posteriori (MAP) graph or a sample (a collection of DAGs) from the posterior distribution given the data. All algorithms are also applicable for structure learning and sampling for dynamic Bayesian networks. References: J. Kuipers, P. Suter, G. Moffa (2022) , N. Friedman and D. Koller (2003) , J. Kuipers and G. Moffa (2017) , M. Kalisch et al. (2012) , D. Geiger and D. Heckerman (2002) , P. Suter, J. Kuipers, G. Moffa, N.Beerenwinkel (2023) .

Copy Link

Version

Install

install.packages('BiDAG')

Monthly Downloads

451

Version

2.1.4

License

GPL (>= 2)

Maintainer

Polina Suter

Last Published

May 16th, 2023

Functions in BiDAG (2.1.4)

getDAG

Extracting adjacency matrix (DAG) from MCMC object
connectedSubGraph

Deriving connected subgraph
getSubGraph

Deriving subgraph
getTrace

Extracting trace from MCMC object
iterativeMCMC class

iterativeMCMC class structure
itercomp

Performance assessment of iterative MCMC scheme against a known Bayesian network
graph2m

Deriving an adjacency matrix of a graph
gsim

A simulated data set from a Gaussian continuous Bayesian network
gsimmat

An adjacency matrix of a simulated dataset
gsim100

A simulated data set from a Gaussian continuous Bayesian network
orderMCMC class

orderMCMC class structure
m2graph

Deriving a graph from an adjacancy matrix
learnBN

Bayesian network structure learning
orderMCMC

Structure learning with the order MCMC algorithm
partitionMCMC

DAG structure sampling with partition MCMC
iterativeMCMC

Structure learning with an iterative order MCMC algorithm on an expanded search space
scoreagainstDAG

Calculating the score of a sample against a DAG
partitionMCMC class

partitionMCMC class structure
interactions

interactions dataset
modelp

Estimating a graph corresponding to a posterior probability threshold
scoreagainstDBN

Score against DBN
plotdiffsDBN

Plotting difference between two DBNs
plotdiffs

Plotting difference between two graphs
string2mat

Deriving interactions matrix
plotDBN

Plotting a DBN
plot2in1

Highlighting similarities between two graphs
kirp

kirp dataset
scoreparameters

Initializing score object
mapping

mapping dataset
scorespace

Prints 'scorespace' object
sampleBN

Bayesian network structure sampling from the posterior distribution
scorespace class

scorespace class structure
kirc

kirc dataset
plotpcor

Comparing posterior probabilitites of single edges
samplecomp

Performance assessment of sampling algorithms against a known Bayesian network
plotpedges

Plotting posterior probabilities of single edges
DBNmat

An adjacency matrix of a dynamic Bayesian network
bidag2coda

Converting a single BiDAG chain to mcmc object
DAGscore

Calculating the BGe/BDe score of a single DAG
bidag2codalist

Converting multiple BiDAG chains to mcmc.list
DBNscore

Calculating the BGe/BDe score of a single DBN
full2compact

Deriving a compact adjacency matrix of a DBN
compareDBNs

Comparing two DBNs
edgep

Estimating posterior probabilities of single edges
getRuntime

Extracting runtime
Boston

Boston housing data
DBNunrolled

An unrolled adjacency matrix of a dynamic Bayesian network
Asiamat

Asiamat
Asia

Asia dataset
getSpace

Extracting scorespace from MCMC object
DBNdata

Simulated data set from a 2-step dynamic Bayesian network
compact2full

Deriving an adjecency matrix of a full DBN
compareDAGs

Comparing two graphs
getMCMCscore

Extracting score from MCMC object