powered by
Convert the adjacency matrix representing the DAG of a BN into the adjacency matrix representing a CPDAG for the network.
BN
dag.to.cpdag(dag.adj.matrix, layering = NULL, layer.struct = NULL)
the adjacency matrix representing a CPDAG for the network.
the adjacency matrix representing the DAG of a BN.
vector containing the layers where each node belongs.
layer.struct 0/1 matrix for indicating which layers can contain parent nodes for nodes in a layer (only for mmhc, mmpc).
0/1
mmhc
mmpc
wpdag.from.dag
if (FALSE) { net <- learn.network(dataset, layering=layering, layer.struct=layer.struct) pdag <- dag.to.cpdag(dag(net), layering, layer.struct) wpdag(net) <- pdag }
Run the code above in your browser using DataLab