powered by
Given a BN object with a dag, return a network with its wpdag set as the CPDAG computed starting from the dag.
BN
dag
wpdag
wpdag.from.dag(x, layering = NULL, layer.struct = NULL)# S4 method for BN wpdag.from.dag(x, layering = NULL, layer.struct = NULL)
# S4 method for BN wpdag.from.dag(x, layering = NULL, layer.struct = NULL)
a BN object with an initialized wpdag.
a BN object.
vector containing the layers each node belongs to.
0/1 matrix for indicating which layers can contain parent nodes for nodes in a layer (only for mmhc, mmpc).
0/1
mmhc
mmpc
dag.to.cpdag
if (FALSE) { net <- learn.network(dataset, layering=layering, layer.struct=layer.struct) wp.net <- wpdag.from.dag(net, layering, layer.struct=layer.struct) }
Run the code above in your browser using DataLab