enumerateBNSpace: Enumerate the space of BNs.

Description Usage Arguments Value Examples

View source: R/space-bn.R

Description

Enumerate (ie make a list of, not just count) the entire space of Bayesian Networks models, on a given number of nodes.

Usage

1
2
3
  enumerateBNSpace(n, allowCyclic = F, banned =
  vector("list", n), required = vector("list", n),
  maxIndegree = n - 1, multicore = F, check = T)

Arguments

n

The number of nodes

allowCyclic

A logical indicating whether cyclic directed graphs should be filtered out.

banned

A list of length n. Each component indicates which nodes cannot be parents of the corresponding node.

required

A list of length n. Each component indicates which nodes must be includes as parents of the corresponding node.

maxIndegree

The maximum indegree of all nodes. A numeric of length 1.

multicore

A logical specifying whether to use mclapply.

check

Should the input be checked for validity?

Value

A parental.list including ALL the directed acyclic graphs with n nodes.

Examples

1
2
3
4
5
enumerateBNSpace(3)
enumerateBNSpace(3, banned = list(c(), 1, c()))

x <- enumerateBNSpace(3, allowCyclic = TRUE)
filterCyclic(x)

rjbgoudie/parental documentation built on May 27, 2019, 9:11 a.m.