layer_DAGs: Generate graph comprised of sequentially layered randomly...

Description Usage Arguments Value Examples

Description

This is useful for generating a random network that is layered in structure. While the nodes in each subgraph layer is densely connected, only a subset of nodes in each layer, connect to the next or previous layer. Namely, all parentless nodes and their children in layer n are connected to all childless nodes and their parents in layer n - 1. Each subgraphs are generated using Ide's and Cozman's Generating Multi-connected DAGs algorithm, as implemented in the bnlearn pacakge. The resulting network is still a DAG.

Usage

1
layer_DAGs(k, n, method = "ic-dag")

Arguments

k

Number of layers.

n

Number of nodes in each layer

method

the algorithm used in simulation. The default is Ide's and Cozman's DAG algorithm in the bnlearn package, which generates DAGs with more connectivity. See the random.graph function in bnlearn for details.

Value

A DAG as an igraph object.

Examples

1
2
g <- layer_DAGs(3, 4)
igraphviz(g)

robertness/lucy documentation built on May 27, 2019, 10:32 a.m.