Learn R Programming

sparsebn (version 0.1.2)

pathfinder: The pathfinder network

Description

Simulated data and network for the pathfinder network from the Bayesian network repository. Pathfinder is an expert system developed by Heckerman et. al (1992) [1] to assist with the diagnosis of lymph-node diseases.

Usage

data(pathfinder)

Arguments

Format

A list with four components:

  • dag An edgeList containing the pathfinder network (109 nodes, 195 edges).

  • data A data.frame with 109 variables and 1000 observations.

  • ivn A list specifying which nodes are under intervention in each observation; since this dataset is purely observational, this is just NULL. Compatible with the input to sparsebnData.

  • cov Covariance matrix used to generate the data.

Details

This is a benchmark network used to test algorithms for learning Bayesian networks. The data is simulated from a Gaussian SEM assuming unit edge weights and unit variances for all nodes.

References

[1] Heckerman, David E., and Bharat N. Nathwani. "An evaluation of the diagnostic accuracy of Pathfinder." Computers and Biomedical Research 25.1 (1992): 56-74.

Examples

Run this code
# NOT RUN {
### Create a valid sparsebnData object from the simulated pathfinder data
data(pathfinder)
dat <- sparsebnData(pathfinder$data, type = "c")

### Code to reproduce this dataset by randomly generating edge weights
coefs <- runif(n = num.edges(pathfinder$dag), min = 0.5, max = 2) # coefficients
vars <- rep(1, num.nodes(pathfinder$dag))                         # variances
params <- c(coefs, vars)                                          # parameter vector
pathfinder.data <- generate_mvn_data(graph = pathfinder$dag,
                                     params = params,
                                     n = 1000)

# }

Run the code above in your browser using DataLab