Package edu.cmu.tetrad.graph
Class GraphTransforms
java.lang.Object
edu.cmu.tetrad.graph.GraphTransforms
Transformations that transform one graph into another.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Graph
cpdagForDag
(Graph dag) Returns the completed partially directed acyclic graph (CPDAG) for a given directed acyclic graph (DAG).static Graph
dagFromCpdag
(Graph graph) dagFromCpdag.static Graph
dagFromCpdag
(Graph graph, Knowledge knowledge) Returns a DAG from the given CPDAG.static @NotNull Graph
Converts a Directed Acyclic Graph (DAG) to a Partial Ancestral Graph (PAG) using the DagToPag algorithm.generateCpdagDags
(Graph cpdag, boolean orientBidirectedEdges) Generates the list of DAGs in the given cpdag.getAllGraphsByDirectingUndirectedEdges
(Graph skeleton) Returns a list of all possible graphs obtained by directing undirected edges in the given graph.getDagsInCpdagMeek
(Graph cpdag, Knowledge knowledge) Retrieves a list of directed acyclic graphs (DAGs) within the given completed partially directed acyclic graph (CPDAG) using the Meek rules.static Graph
Transforms a partially ancestral graph (PAG) into a maximally ancestral graph (MAG) using Zhang's 2008 Theorem 2.
-
Constructor Details
-
GraphTransforms
public GraphTransforms()
-
-
Method Details
-
dagFromCpdag
dagFromCpdag.
-
dagFromCpdag
Returns a DAG from the given CPDAG. If the given CPDAG is not a PDAG, returns null.- Parameters:
graph
- the CPDAGknowledge
- the knowledge- Returns:
- a DAG from the given CPDAG. If the given CPDAG is not a PDAG, returns null.
-
pagToMag
Transforms a partially ancestral graph (PAG) into a maximally ancestral graph (MAG) using Zhang's 2008 Theorem 2.- Parameters:
pag
- The partially ancestral graph to transform.- Returns:
- The maximally ancestral graph obtained from the PAG.
-
generateCpdagDags
Generates the list of DAGs in the given cpdag. -
getDagsInCpdagMeek
Retrieves a list of directed acyclic graphs (DAGs) within the given completed partially directed acyclic graph (CPDAG) using the Meek rules. -
getAllGraphsByDirectingUndirectedEdges
Returns a list of all possible graphs obtained by directing undirected edges in the given graph.- Parameters:
skeleton
- the graph to transform- Returns:
- a list of all possible graphs obtained by directing undirected edges
-
cpdagForDag
Returns the completed partially directed acyclic graph (CPDAG) for a given directed acyclic graph (DAG).- Parameters:
dag
- The input DAG.- Returns:
- The CPDAG resulting from applying Meek Rules to the input DAG.
-
dagToPag
Converts a Directed Acyclic Graph (DAG) to a Partial Ancestral Graph (PAG) using the DagToPag algorithm.- Parameters:
trueGraph
- The input DAG to be converted.- Returns:
- The resulting PAG obtained from the input DAG.
-