Learn R Programming

bnstruct (version 1.0)

wpdag.from.dag: Initialize a WPDAG from a DAG.

Description

Given a BN object with a dag, return a network with its wpdag set as the CPDAG computed starting from the dag.

Usage

wpdag.from.dag(x, layering = NULL)
"wpdag.from.dag"(x, layering = NULL)

Arguments

x
a BN object.
layering
vector containing the layers each node belongs to.

Value

a BN object with an initialized wpdag.

See Also

dag.to.cpdag

Examples

Run this code
## Not run: 
# net <- learn.network(dataset, layering=layering)
# wp.net <- wpdag.from.dag(net, layering)
# ## End(Not run)

Run the code above in your browser using DataLab