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

Description Usage Arguments Value See Also Examples

Description

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

Usage

1
2
3
4
wpdag.from.dag(x, layering = NULL, layer.struct = NULL)

## S4 method for signature 'BN'
wpdag.from.dag(x, layering = NULL, layer.struct = NULL)

Arguments

x

a BN object.

layering

vector containing the layers each node belongs to.

layer.struct

0/1 matrix for indicating which layers can contain parent nodes for nodes in a layer (only for mmhc, mmpc).

Value

a BN object with an initialized wpdag.

See Also

dag.to.cpdag

Examples

1
2
3
4
5
## Not run: 
net <- learn.network(dataset, layering=layering, layer.struct=layer.struct)
wp.net <- wpdag.from.dag(net, layering, layer.struct=layer.struct)

## End(Not run)

tavazzie/bnstructScore documentation built on Dec. 23, 2021, 7:47 a.m.