dag.to.cpdag: convert a DAG to a CPDAG

View source: R/BN-methods.R

dag.to.cpdagR Documentation

convert a DAG to a CPDAG

Description

Convert the adjacency matrix representing the DAG of a BN into the adjacency matrix representing a CPDAG for the network.

Usage

dag.to.cpdag(dag.adj.matrix, layering = NULL)

Arguments

dag.adj.matrix

the adjacency matrix representing the DAG of a BN.

layering

vector containing the layers each node belongs to.

Value

the adjacency matrix representing a CPDAG for the network.

See Also

wpdag.from.dag

Examples

## Not run: 
net <- learn.network(dataset, layering=layering)
pdag <- dag.to.cpdag(dag(net), layering)
wpdag(net) <- pdag

## End(Not run)


cbg-ethz/SubGroupSeparation documentation built on Feb. 11, 2023, 8:29 p.m.