Learn R Programming

bnlearn (version 3.1)

learning.test: Synthetic (discrete) data set to test learning algorithms

Description

This a synthetic data set used as a test case in the bnlearn package.

Usage

data(learning.test)

Arguments

format

The learning.test data set contains the following variables:
  • A, a three-level factor with levelsa,bandc.
  • B, a three-level factor with levelsa,bandc.
  • C, a three-level factor with levelsa,bandc.
  • D, a three-level factor with levelsa,bandc.
  • E, a three-level factor with levelsa,bandc.
  • F, a two-level factor with levelsaandb.

Examples

Run this code
# load the data and build the correct network from the model string.
data(learning.test)
res = empty.graph(names(learning.test))
modelstring(res) = "[A][C][F][B|A][D|A:C][E|B:F]"
plot(res)

Run the code above in your browser using DataLab